結果
| 問題 |
No.721 Die tertia (ディエ・テルツィア)
|
| コンテスト | |
| ユーザー |
👑 |
| 提出日時 | 2020-01-21 18:27:11 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 446 bytes |
| コンパイル時間 | 497 ms |
| コンパイル使用メモリ | 63,744 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-05 22:13:31 |
| 合計ジャッジ時間 | 1,311 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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;
}