题解 | #定制显示器#
定制显示器
https://www.nowcoder.com/practice/b0a788bcb021425f9391067fd2646b07
name = input()
age = int(input())
if age%10==1 and age%100 != 11:
print('Happy {}st birthday to {}!'.format(age,name))
elif age%10==2 and age%100 != 12:
print('Happy {}nd birthday to {}!'.format(age,name))
elif age%10==3 and age%100 != 13:
print('Happy {}rd birthday to {}!'.format(age,name))
else:
print('Happy {}th birthday to {}!'.format(age,name))
查看12道真题和解析
汤臣倍健公司氛围 420人发布