Find file History
Latest commit 30923d1 Jun 24, 2016 @cuklev cuklev New sample tests format
Permalink
..
Failed to load latest commit information.
tests Add sample tests Jun 14, 2016
README.md New sample tests format Jun 24, 2016

README.md

Number as words

Description

Write a script that converts a number in the range [0…999] to words, corresponding to its English pronunciation.

Input

  • The input will consist of an array containing the number as a string

Output

  • The output should be a single line containing the answer

Constraints

  • Time limit: 0.2s
  • Memory limit: 16MB

Sample tests

Sample test 1

Input

['0']

Output

Zero 

Sample test 2

Input

['9']

Output

Nine 

Sample test 3

Input

['10']

Output

Ten 

Sample test 4

Input

['12']

Output

Twelve 

Sample test 5

Input

['19']

Output

Nineteen 

Sample test 6

Input

['25']

Output

Twenty five 

Sample test 7

Input

['98']

Output

Ninety eight 

Sample test 8

Input

['273']

Output

Two hundred and seventy three 

Sample test 9

Input

['400']

Output

Four hundred 

Sample test 10

Input

['501']

Output

Five hundred and one 

Sample test 11

Input

['617']

Output

Six hundred and seventeen 

Sample test 12

Input

['711']

Output

Seven hundred and eleven 

Sample test 13

Input

['999']

Output

Nine hundred and ninety nine