結果
| 問題 | No.87 Advent Calendar Problem |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-09-23 08:35:36 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 372 bytes |
| 記録 | |
| コンパイル時間 | 285 ms |
| コンパイル使用メモリ | 71,168 KB |
| 実行使用メモリ | 5,888 KB |
| 最終ジャッジ日時 | 2026-07-25 13:39:52 |
| 合計ジャッジ時間 | 52,052 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 6 WA * 18 |
ソースコード
#include <iostream>
using namespace std;
int calc(int a){
int x=0;
if(a%4==0){
x=1;
if(a%100==0){
x=0;
if(a%400==0){
x=1;
}
}
}
return x;
}
int main(){
int N;
cin>>N;
int x=0,y=0;
for(int i=2015; i<=N; ++i){
x+=1;
if(calc(i)) x+=1;
if(x==7) x=0, y+=1;
if(x==8) x=1;
}
cout<<y<<endl;
return 0;
}