結果
問題 | No.721 Die tertia (ディエ・テルツィア) |
ユーザー |
![]() |
提出日時 | 2018-08-03 22:28:44 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 697 bytes |
コンパイル時間 | 701 ms |
コンパイル使用メモリ | 81,024 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-19 17:29:32 |
合計ジャッジ時間 | 1,359 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 18 |
ソースコード
#include <iostream> #include <algorithm> #include <vector> #include <set> #include <map> #include <queue> #include <stack> #include <cstdio> #include <cstring> #include <math.h> using namespace std; typedef long long ll; typedef double D; typedef pair<int,int> P; #define M 1000000007 #define F first #define S second #define PB push_back int y,m,d; char c; int u[12]={31,28,31,30,31,30,31,31,30,31,30,31}; int main(void){ cin>>y>>c>>m>>c>>d; if(y%4==0){ if(y%100!=0)u[1]++; else if(y%400==0)u[1]++; } d+=2; if(u[m-1]<d){ d-=u[m-1]; m++; if(m==13){ y++; m=1; } } printf("%d/%02d/%02d\n",y,m,d); }