結果

問題 No.138 化石のバージョン
ユーザー sakura_metalsakura_metal
提出日時 2015-05-31 15:53:28
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 504 bytes
コンパイル時間 396 ms
コンパイル使用メモリ 53,384 KB
実行使用メモリ 4,500 KB
最終ジャッジ日時 2023-09-20 18:03:57
合計ジャッジ時間 1,698 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 2 ms
4,380 KB
testcase_03 AC 2 ms
4,376 KB
testcase_04 AC 2 ms
4,376 KB
testcase_05 AC 2 ms
4,380 KB
testcase_06 AC 1 ms
4,376 KB
testcase_07 AC 2 ms
4,380 KB
testcase_08 AC 2 ms
4,376 KB
testcase_09 AC 1 ms
4,380 KB
testcase_10 AC 1 ms
4,376 KB
testcase_11 AC 2 ms
4,380 KB
testcase_12 WA -
testcase_13 AC 1 ms
4,376 KB
testcase_14 WA -
testcase_15 AC 1 ms
4,500 KB
testcase_16 AC 2 ms
4,380 KB
testcase_17 AC 1 ms
4,380 KB
testcase_18 AC 1 ms
4,376 KB
testcase_19 AC 1 ms
4,380 KB
testcase_20 AC 2 ms
4,380 KB
testcase_21 AC 2 ms
4,376 KB
testcase_22 AC 2 ms
4,376 KB
testcase_23 AC 2 ms
4,376 KB
testcase_24 AC 2 ms
4,376 KB
testcase_25 AC 2 ms
4,376 KB
testcase_26 AC 1 ms
4,376 KB
testcase_27 AC 1 ms
4,376 KB
testcase_28 AC 1 ms
4,380 KB
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 AC 2 ms
4,376 KB
testcase_33 WA -
testcase_34 AC 2 ms
4,376 KB
testcase_35 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>


using namespace std;


int main(){
	string ostr,nstr;
	string old = "",noww ="";
	
	cin >> ostr;
	cin >> nstr;

	int j=2;
	for(int i=0 ;i< ostr.size();i++){
		if(ostr[i] == '.'){
			j--;
		}else{
			old += ostr[i];
		}
	}

	for(int i=0 ;i< nstr.size();i++){
		if(nstr[i] == '.'){
			j--;
		}else{
			noww += nstr[i];
		}
	}	

	int iold,inoww;
	iold = stoi(old);
	inoww = stoi(noww);
	if(old >= noww){
		cout << "YES" << endl;
	}else{
		cout << "NO" << endl;
	}

}
0