結果
| 問題 | No.779 Heisei | 
| コンテスト | |
| ユーザー |  hirotakashin040 | 
| 提出日時 | 2019-02-09 14:05:58 | 
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 669 bytes | 
| コンパイル時間 | 590 ms | 
| コンパイル使用メモリ | 63,652 KB | 
| 実行使用メモリ | 5,376 KB | 
| 最終ジャッジ日時 | 2024-07-01 19:08:35 | 
| 合計ジャッジ時間 | 1,651 ms | 
| ジャッジサーバーID (参考情報) | judge1 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | WA * 23 | 
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:20:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   20 |         scanf("%d",&y);
      |         ~~~~~^~~~~~~~~
main.cpp:22:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   22 |         scanf("%d",&m);
      |         ~~~~~^~~~~~~~~
main.cpp:24:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   24 |         scanf("%d",&d);
      |         ~~~~~^~~~~~~~~
            
            ソースコード
#include<iostream>
#include<string>
#include<vector>
#include<cstring>
#include<algorithm>
#include<stdio.h>
#include<cmath>
using namespace std;
int main()
{
	int y;
	int m;
	int d;
	cout<<"	日つけを入力"<<endl;
	cout<<"年"<<endl;
	scanf("%d",&y);
	cout<<"月"<<endl;
	scanf("%d",&m);
	cout<<"日"<<endl;
	scanf("%d",&d);
	if(y > 1990 && y < 2019)
	{
		cout<<"YES"<<endl;
	}
	else if(y == 1989 && m >1 )
	{
		cout<<"YES"<<endl;
	}
	else if(y == 1989 && m==1 && d>=8)
	{
		cout<<"YES"<<endl;
	}
	else if(y == 2019 && m <4)
	{
		cout<<"YES"<<endl;
	}
	else if( y ==2019 && m ==4 && d<=30)
	{
		cout<<"YES"<<endl;
	}
	else
	{
		cout<<"NO"<<endl;
	}
}
            
            
            
        