- 题目
Given a non-negative integer N(非零整数N), your task is to compute the sum of all the digits of N, and output every digit of the sum in English.
Input Specification:
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.
Sample Input:
12345
Sample Output:
one five
- 代码
inp=list(map(int,inp))
im=sum(inp)
im=list(str(im))
print(im)
d={"0":"zero","1":"one","2":"two","3":"three","4":"four","5":"five","6":"six","7":"seven","8":"eight","9":"nine"}
out=""
for i in im:
out=out+d[i]+" "
print(out[:-1])