n,y,r = map(int,input().split()) ts = [];zt = 0 if n%400 == 0 or (n%100 != 0 and n%4 == 0): ts = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31] else: ts = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31] for i in range(y-1): zt+=ts[i] zt+=r print(zt)
注册一个 Online Judge 通用账户,您就可以在我们提供的所有在线评测服务上提交代码、参与讨论。
使用您的 Online Judge 通用账户