fork(1) download
  1. __author__ = 'Zlobober'
  2. n = int(raw_input())
  3. A = ["zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine",
  4. "ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen", "seventeen", "eighteen", "nineteen"]
  5. B = ["twenty", "thirty", "forty", "fifty", "sixty", "seventy", "eighty", "ninety"]
  6. if n < 20:
  7. print A[n]
  8. else:
  9. a = (n // 10) - 2
  10. b = n % 10
  11. if b == 0:
  12. print B[a]
  13. else:
  14. print B[a] + "-" + A[b]
Runtime error #stdin #stdout #stderr 0.01s 7736KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Traceback (most recent call last):
  File "prog.py", line 2, in <module>
EOFError: EOF when reading a line