1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | #include <iostream> using namespace std; int main() { int A = 0; while (1) { cin >> A; if (A >= 1 && A <= 4000) break; } if ((A % 4 == 0 && A %100 != 0)||A%400 == 0) cout << 1 << endl; else cout << 0 << endl; return 0; } | cs |