|
|
back to boardDiscussion of Problem 1068. SumI do need some help in the 1068 problem, When using IDE is OK, but submit crash many times. Hello, I tried many times, but do not know where is the problem, I wrote java and run on IDE it seems OK, but every time when I submitted it can not be accepted. Would you please give me some help. Thank you so much! import java.util.*; public class SumAllInt1068 { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); int d = sc.nextInt(); int f = sc.nextInt(); int e = a+b+c+d+f; System.out.println(e); } } Re: I do need some help in the 1068 problem, When using IDE is OK, but submit crash many times. The input consists of a SINGLE integer. You have got Crash because try to read 5 integers. Look Sample test. Re: I do need some help in the 1068 problem, When using IDE is OK, but submit crash many times. I understand, thank you so much for your help. |
|
|