#include <stdio.h> int main() { char a[100] = {'\0'}; int sum=0,ge, shi, bai,i=0; char Num[10][5] = { "ling","yi","er","san" ,"si","wu","liu","qi","ba","jiu", }; scanf("%s", &a); while (a[i] != '\0') { switch (a[i]) { case '0': i++; break; case '1': sum += 1; i++; break; case '2': sum += 2; i++; break; case '3': sum += 3; i++; break; case '4': sum += 4; i++; break; case '5': sum += 5; i++; break; case '6': sum += 6; i++; break; case '7': sum += 7; i++; break; case '8': sum += 8; i++; break; case '9': sum += 9; i++; break; } } ge = sum % 10; shi = sum % 100 / 10; bai = sum / 100; if (bai == 0) { if (shi == 0) { printf("%s", Num[ge]); } else { printf("%s %s", Num[shi], Num[ge]); } } else { printf("%s %s %s", Num[bai], Num[shi], Num[ge]); } return 0; }