結果

問題 No.138 化石のバージョン
ユーザー startcpp
提出日時 2015-01-29 23:41:16
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 314 bytes
コンパイル時間 579 ms
コンパイル使用メモリ 53,588 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-06-23 04:11:50
合計ジャッジ時間 1,408 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 29 WA * 4
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:9:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    9 |         scanf("%d.%d.%d",&a,&b,&c);
      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~
main.cpp:11:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   11 |         scanf("%d.%d.%d",&a,&b,&c);
      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~

ソースコード

diff #

#include<stdio.h>
#include<iostream>
using namespace std;

int a, b, c;
int in1, in2;

int main() {
	scanf("%d.%d.%d",&a,&b,&c);
	in1 = a*1000000 + b*1000 + c;
	scanf("%d.%d.%d",&a,&b,&c);
	in2 = a*1000000 + b*1000 + c;
	if( in1 > in2 ) {
		cout << "YES" << endl;
	}
	else {
		cout << "NO" << endl;
	}
	return 0;
}
0