|
|
back to boardHelp me find mistake. Java Posted by TolyanD 21 Jan 2016 20:24 import java.util.Scanner; public class T1048 { public static void main(String[] args){ Scanner sc=new Scanner(System.in); int a=sc.nextInt(); int[] mas=new int[a]; int[] mas1=new int[a]; String b=""; String b1=""; for(int i=0;i<a;i++) { mas[i]=sc.nextInt(); b+=mas[i]; mas1[i]=sc.nextInt(); b1+=mas1[i]; } int v=Integer.parseInt(b); int v1=Integer.parseInt(b1); System.out.println(v+v1); }} Timus text "Runtime error" №2 Re: Help me find mistake. Java Task: > The first line contains a single integer N that is the length of the given integers (1 ≤ N ≤ 1 000 000) Your code: > int v=Integer.parseInt(b); How many digits can be placed into int v? |
|
|