結果

問題 No.138 化石のバージョン
ユーザー cande398
提出日時 2018-03-28 03:22:51
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 246 bytes
コンパイル時間 556 ms
コンパイル使用メモリ 56,044 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-25 13:02:28
合計ジャッジ時間 1,950 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 30 WA * 3
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:7:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    7 |         scanf("%d.%d.%d", &a, &b, &c);
      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
main.cpp:8:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    8 |         scanf("%d.%d.%d", &d, &e, &f);
      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~

ソースコード

diff #

#include <iostream>
using namespace std;

int main(void)
{
	int a, b, c, d, e, f;
	scanf("%d.%d.%d", &a, &b, &c);
	scanf("%d.%d.%d", &d, &e, &f);
	if(a*100+b*10+c >= d*100+e*10+f) {
		cout << "YES" << endl;
	}
	else {
		cout << "NO" << endl;
	}
}
0