Run ID:149026

提交时间: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; }