結果
問題 |
No.138 化石のバージョン
|
ユーザー |
![]() |
提出日時 | 2015-05-31 15:53:28 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 504 bytes |
コンパイル時間 | 525 ms |
コンパイル使用メモリ | 58,340 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-06 12:59:48 |
合計ジャッジ時間 | 1,300 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 26 WA * 7 |
ソースコード
#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; } }