Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
124059 | 柯轶炜 | 过生日 | Python3 | Accepted | 79 MS | 3768 KB | 533 | 2025-07-10 21:46:43 |
def is_leap(year): if year % 4 != 0: return False elif year % 100 != 0: return True else: return year % 400 == 0 def find_nth_leap(Y, N): count = 0 current_year = Y while count < N: if is_leap(current_year): count += 1 if count == N: return current_year current_year += 1 return current_year - 1 T = int(input()) for _ in range(T): Y, N = map(int, input().split()) print(find_nth_leap(Y, N))