判断一个整数n是否是闰年
输入一个整数n ()
是闰年输出"yes" 否则输出"no"
2000
yes
1900
no
n = int(input()) print('yes' if n%400 == 0&nbs***bsp;(n%100 != 0 and n%4 ==0) else 'no')
n = int(input()) if n >= 1 and n <=2018: if (n % 4 == 0 and n % 100 != 0)&nbs***bsp;n % 400 == 0: print("yes") else: print("no") else: print()
这道题你会答吗?花几分钟告诉大家答案吧!
扫描二维码,关注牛客网
下载牛客APP,随时随地刷题