結果
問題 |
No.721 Die tertia (ディエ・テルツィア)
|
ユーザー |
|
提出日時 | 2018-09-21 16:10:16 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 587 bytes |
コンパイル時間 | 567 ms |
コンパイル使用メモリ | 71,404 KB |
最終ジャッジ日時 | 2025-01-06 13:39:36 |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 8 WA * 10 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:25:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 25 | scanf("%d/%d/%d",&y,&m,&d); | ~~~~~^~~~~~~~~~~~~~~~~~~~~
ソースコード
#include<vector> #include<iostream> #include<stdio.h> #include<string> #include<utility> #include<algorithm> #define loop while(1) #define SZ(x) ((int)(x).size()) #define REP(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i) #define pushb push_back #define popb pop_back #define VI vector<int> #define VVI vector<VI> typedef long long int ll; using namespace std; int main() { int y,m,d; scanf("%d/%d/%d",&y,&m,&d); d+=2; if(d>31){ d %= 31; m++; } if(m>12){ m %= 12; y++; } printf("%04d/%02d/%02d",y,m,d); return 0; }