結果
問題 |
No.779 Heisei
|
ユーザー |
![]() |
提出日時 | 2019-02-22 19:32:14 |
言語 | C (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 1,000 ms |
コード長 | 560 bytes |
コンパイル時間 | 214 ms |
コンパイル使用メモリ | 28,160 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-06 05:16:24 |
合計ジャッジ時間 | 997 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 23 |
ソースコード
#include <stdio.h> #include <string.h> #include <stdlib.h> #define H_START 19890108 //平成の始まり #define H_END 20190430 //平成の終わり int main(void) { int year; int month; int day; char output_ymd[12]; int int_ymd; //標準入力 scanf("%d %d %d", &year, &month, &day); //年月日作成 sprintf(output_ymd, "%d%02d%02d", year, month, day); //int型に変換 int_ymd = atoi(output_ymd); //判定 if (int_ymd < H_START || int_ymd > H_END) { printf("No\n"); } else { printf("Yes\n"); } return 0; }