結果
| 問題 | No.779 Heisei |
| コンテスト | |
| ユーザー |
toto
|
| 提出日時 | 2025-04-01 15:41:29 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 1,000 ms |
| コード長 | 718 bytes |
| 記録 | |
| コンパイル時間 | 493 ms |
| コンパイル使用メモリ | 27,136 KB |
| 実行使用メモリ | 7,716 KB |
| 最終ジャッジ日時 | 2025-04-01 15:41:30 |
| 合計ジャッジ時間 | 1,477 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 23 |
コンパイルメッセージ
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){
if(day > 7){
printf("Yes");
return 0;
}else{
printf("No");
return 0;
}
}else if(month > 1){
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