結果
| 問題 |
No.779 Heisei
|
| コンテスト | |
| ユーザー |
toto
|
| 提出日時 | 2025-04-01 15:33:59 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 557 bytes |
| コンパイル時間 | 290 ms |
| コンパイル使用メモリ | 26,880 KB |
| 実行使用メモリ | 7,840 KB |
| 最終ジャッジ日時 | 2025-04-01 15:34:01 |
| 合計ジャッジ時間 | 1,327 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 22 WA * 1 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:5:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
5 | scanf("%d%d%d",&year,&month,&day);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
int main(){
int year,month,day;
scanf("%d%d%d",&year,&month,&day);
if(year == 1989){
if(month >= 1 && day >= 8){
printf("Yes");
return 0;
}else{
printf("No");
return 0;
}
}else if(year == 2019){
if(month < 5){
printf("Yes");
return 0;
}else{
printf("No");
return 0;
}
}else if(year > 1989 && year < 2019){
printf("Yes");
return 0;
}
printf("No");
}
toto