結果
| 問題 | No.87 Advent Calendar Problem |
| コンテスト | |
| ユーザー |
trineutron
|
| 提出日時 | 2021-01-17 17:12:00 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 343 bytes |
| 記録 | |
| コンパイル時間 | 1,113 ms |
| コンパイル使用メモリ | 211,872 KB |
| 実行使用メモリ | 11,296 KB |
| 最終ジャッジ日時 | 2026-06-17 03:40:17 |
| 合計ジャッジ時間 | 13,872 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 3 |
| other | TLE * 1 -- * 23 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main() {
int64_t n;
cin >> n;
int64_t ans = 0;
int d = 0;
for (int i = 2015; i <= n; i++) {
d++;
if (i % 4 == 0) d++;
if (i % 100 == 0) d--;
if (i % 400 == 0) d++;
d %= 7;
if (d == 0) ans++;
}
cout << ans << endl;
}
trineutron