| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 149026 | 赖泓宇 | 11下一次奥运会 | C++ | Accepted | 0 MS | 272 KB | 335 | 2026-03-06 18:33:41 |
#include <iostream> using namespace std; int main() { int y, diff; cin >> y; // 计算当前年份与2008的差值,取模4得到余数 int rem = (y - 2008) % 4; // 余数为0时下一届是4年后,否则是4-余数年 diff = (rem == 0) ? 4 : 4 - rem; cout << diff << endl; return 0; }