結果

問題 No.138 化石のバージョン
ユーザー startcppstartcpp
提出日時 2015-01-29 23:42:07
言語 C++11
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 315 bytes
コンパイル時間 471 ms
コンパイル使用メモリ 55,468 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-12-29 12:53:40
合計ジャッジ時間 1,491 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 33
権限があれば一括ダウンロードができます
コンパイルメッセージ
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