Diagnostic Test 2016 Level 2

Problem 1: Polan cannot into space

It is common knowledge that Polska's space program is extremely lacking. However, despite the concerted effort of intelligence agencies around the world, no one knows why polan cannot into space. The truth is, Polska has been hiding a terrible secret for many years: he is very bad at math!

Today, he is being tested in addition at the Jagiellonian University. The professor will dictate a list of one digit numbers, which will end when he says "No more numbers." Help Polska pass his math test, by outputting the correct sum, as an integer.

Sample Input

one
three
nine
five
six
zero
No more numbers.

Sample Output

24

All Submissions
Best Solutions


Point Value: 3
Time Limit: 2.00s
Memory Limit: 16M
Added: Oct 13, 2016
Author: Cynthia

Languages Allowed:
C++03, PAS, C, HASK, ASM, RUBY, PYTH2, JAVA, PHP, SCM, CAML, PERL, C#, C++11, PYTH3

Comments (Search)

why does this happen when i submitted: Standard Error (clipped)?

mathdude2017, can you please check that you are using the right language before submitting and putting up questions like this, it says what the line that had the problem, your program was one line of Standard Error (clipped), and since that's not a language that is supported by wcipeg, so it said there was error on line 1, and the content of line one which was Standard Error (clipped), there was no standard issues. You need to stop doing this over and over again, because there is no point filling up the comment section with useless comments like this. for further problems, go to the wiki help page up on the black bar which contains the problems and main url, the (help(README)) thing, so good luck in your future programming

Generally, programs will have two outputs available to them by default: Standard Output ("stdout"), and Standard Error ("stderr"). Often, when your program breaks, a message may be printed to stderr giving more details.

The reason it says "(clipped)" is because we show you a portion of the stderr. We show you a portion because it may help you in debugging (often, you only need to see the first few characters to know what exception occurred), but we clip it so that you can't just cheat and print all the input to stderr to figure out what it is.

If you're curious, here are the full contents of your stderr:

Exception in thread "main" java.util.NoSuchElementException: No line found 
at java.util.Scanner.nextLine(Scanner.java:1585)
at dt16l2p1.main(dt16l2p1.java:8)