結果
| 問題 |
No.721 Die tertia (ディエ・テルツィア)
|
| コンテスト | |
| ユーザー |
xxxasdfghjk
|
| 提出日時 | 2018-09-07 10:18:38 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 617 bytes |
| コンパイル時間 | 2,336 ms |
| コンパイル使用メモリ | 158,144 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-26 06:27:14 |
| 合計ジャッジ時間 | 2,683 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 3 WA * 15 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:14:8: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
14 | scanf("%d/%d/%d",&y,&m,&d);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
ソースコード
#include<bits/stdc++.h>
#define MAX_N 100001
#define INF_INT 2147483647
#define INF_LL 9223372036854775807
#define REP(i,n) for(int i=0;i<(int)(n);i++)
using namespace std;
typedef long long int ll;
typedef pair<ll,ll> P;
int main()
{
int N,a[1001],y,m,d;
scanf("%d/%d/%d",&y,&m,&d);
struct tm birthdayStruct = {0,0,0,d,m,y};
time_t now = mktime(&birthdayStruct);
struct tm ts = {0,0,0,birthdayStruct.tm_mday+2,birthdayStruct.tm_mon,birthdayStruct.tm_year};
time_t tomm = mktime(&ts);
struct tm *tt = localtime(&tomm);
printf("%04d/%02d/%02d\n",tt->tm_year,tt->tm_mon,tt->tm_mday);
return 0;
}
xxxasdfghjk