Diagnostic Test '16 Level 2 P1 - Polan cannot into space

View as PDF

Submit solution

Points: 3
Time limit: 1.0s
Memory limit: 16M

Author:
Problem type
Diagnostic Test 2016 Level 2

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

Copy
one
three
nine
five
six
zero
No more numbers.

Sample Output

Copy
24

Comments


  • 0
    CodingCrab_520  commented 71 days ago

    Here is the number list for all you lazy people who decided to scroll down here in hopes of it!

    Copy
    N = {'zero' : 0, 'one' : 1, 'two' : 2, 'three' : 3, 'four' : 4, 'five' : 5, 'six' : 6, 'seven' : 7, 'eight' : 8, 'nine' : 9}