結果

問題 No.721 Die tertia (ディエ・テルツィア)
ユーザー cielciel
提出日時 2018-08-07 01:04:47
言語 C
(gcc 12.3.0)
結果
WA  
実行時間 -
コード長 292 bytes
コンパイル時間 343 ms
コンパイル使用メモリ 27,192 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-19 22:20:34
合計ジャッジ時間 1,250 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,348 KB
testcase_01 WA -
testcase_02 AC 1 ms
4,348 KB
testcase_03 AC 1 ms
4,348 KB
testcase_04 AC 1 ms
4,348 KB
testcase_05 AC 1 ms
4,348 KB
testcase_06 AC 1 ms
4,348 KB
testcase_07 AC 1 ms
4,348 KB
testcase_08 AC 1 ms
4,348 KB
testcase_09 AC 1 ms
4,348 KB
testcase_10 AC 1 ms
4,348 KB
testcase_11 AC 1 ms
4,348 KB
testcase_12 AC 1 ms
4,348 KB
testcase_13 AC 1 ms
4,348 KB
testcase_14 AC 1 ms
4,348 KB
testcase_15 AC 1 ms
4,348 KB
testcase_16 WA -
testcase_17 AC 2 ms
4,348 KB
testcase_18 WA -
testcase_19 AC 1 ms
4,348 KB
testcase_20 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function 'main':
main.c:11:9: warning: implicit declaration of function 'localtime_r'; did you mean 'localtime'? [-Wimplicit-function-declaration]
   11 |         localtime_r(&k,&t);
      |         ^~~~~~~~~~~
      |         localtime

ソースコード

diff #

#include <time.h>
#include <stdio.h>
#include <string.h>
int main(){
	struct tm t;
	memset(&t,0,sizeof(t));
	scanf("%d/%d/%d",&t.tm_year,&t.tm_mon,&t.tm_mday);
	t.tm_mon--;
	time_t k=mktime(&t);
	k+=2*24*60*60;
	localtime_r(&k,&t);
	printf("%d/%02d/%02d\n",t.tm_year,t.tm_mon+1,t.tm_mday);
}
0