py

85 阅读1分钟

chnum=["零","壹","贰","叁","肆","伍","陆","柒","捌","玖","拾"] s=input() while s!="": s=int(s) g=s%10 d=(s%100)/10 b=s/100 b=int(b) d=int(d) g=int(g) if d==0 and g==0: print("%s佰元整"%(chnum[b])) if d==0 and g!=0: print("%s佰%s%s元整"%(chnum[b],chnum[d],chnum[g])) if d!=0 and g==0: print("%s佰%s%s元整"%(chnum[b],chnum[d],chnum[10])) if d!=0 and g!=0: print("%s佰%s%s%s元整"%(chnum[b],chnum[d],chnum[10],chnum[g])) s=input()