oj mrJudge
Toggle navigation
  • Login
    • Forget Password
      Login
User Image

Hello, Stranger

Guest
  • Analysis Mode
  • Problems
    • All Problems
    • Latest Problems
  • Join Us Now
  • Registration
  • Contact Us
  • Infomation
  • About
    • Terms of Use
    • Technical Specifications
    • Credits

numberspeak Batch , stdin/stdout

Registered Users Only

Please login to utilize this feature.

Do note that this website only supports submissions in C++.

numberspeak.html

Problem Description

Gug is building an AI, and is trying to teach the AI how to speak numbers. As Gug finds it too complicated to deal with human things like hundreds or thousands or millions, Gug is teaching his AI simply to recite out the numbers, in decimal form. For example, 592 will be read by his AI as Five nine two and 6070 will be read by his AI as Six zero seven zero.

Gug has a total of T large numbers to give to his AI. The ith number that Gug wants to give to his AI is denoted as Xi. Help Gug determine what his AI will say.

Input

The first line of input will contain one integer, T.

The next T lines of input will contain one integer each, with the ith line containing Xi.

Output

The output should consist of T lines, with the ith line representing what the AI should say after being given Xi.

Limits

Subtask 1 (17%): T = 1, 1 ≤ Xi ≤ 9.

Subtask 2 (23%): T = 1, 1 ≤ Xi ≤ 109.

Subtask 3 (36%): 1 ≤ T ≤ 103, 1 ≤ Xi ≤ 109.

Subtask 4 (24%): 1 ≤ T ≤ 103, 1 ≤ Xi ≤ 10100.

Subtask 5 (0%): Sample Testcases.

Sample Input 1

2
592
6070

Sample Output 1

Five nine two
Six zero seven zero

Tags

Syntax

Subtasks and Limits

Subtask Score #TC Time Memory Scoring
11791s256MBMinimum
223191s256MBMinimum
336301s256MBMinimum
424401s256MBMinimum
5011s256MBMinimum

Judge Compile Command

g++-8 ans.cpp -o numberspeak -Wall -Wshadow -static -O2 -lm -m64 -s -w -std=gnu++17 -fmax-errors=512

Accepted Submissions

subIDUserTimeMax Time

Past Submissions

subIDUserTimeScore
mrJudge 09.05.20
Copyright © 2020 mrJudge. All rights reserved.