結果
| 問題 | No.721 Die tertia (ディエ・テルツィア) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-01-21 18:27:11 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| + 218µs | |
| コード長 | 446 bytes |
| 記録 | |
| コンパイル時間 | 284 ms |
| コンパイル使用メモリ | 72,704 KB |
| 実行使用メモリ | 5,888 KB |
| 最終ジャッジ日時 | 2026-08-08 16:11:57 |
| 合計ジャッジ時間 | 1,660 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 18 |
ソースコード
#include <iostream>
using namespace std;
int month[12] = {31,28,31,30,31,30,31,31,30,31,30,31};
int main(){
int a,b,c;char e;cin>>a>>e>>b>>e>>c;
if(!(a%4)){
if(!(!(a%100) && (a%400))){
month[1]+=1;
}
}
c+=2;
if(month[b-1] < c){
b++;
c-=month[b-2];
}
if(12 < b){
a++;
b-=12;
}
cout << a << e << (b<10?"0":"") << b << e << (c<10?"0":"") << c << endl;
}