Given a non-negative integer?N, your task is to compute the sum of all the digits of?N, and output every digit of the sum in English.
Each input file contains one test case. Each case occupies one line which contains an?N?(≤10100).
Output Specification:
For each test case, output in one line the digits of the sum in English words. There must be one space between two consecutive words, but no extra space at the end of a line.
12345
结尾无空行
Sample Output:
one five
结尾无空行
Sample Solution:
readin=input()
sum=0
map={'0':'zero','1':'one','2':'two','3':'three','4':'four','5':'five','6':'six','7':'seven','8':'eight','9':'nine'}
for i in readin:
sum+=int(i)
s=str(sum)
for i in s[:len(s)-1]:
print(map[i],end=" ")
print(map[s[len(s)-1]],end="")
附提交结果
?
|