結果
問題 |
No.138 化石のバージョン
|
ユーザー |
![]() |
提出日時 | 2015-11-15 20:16:55 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 291 bytes |
コンパイル時間 | 437 ms |
コンパイル使用メモリ | 58,052 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-09-13 15:12:49 |
合計ジャッジ時間 | 1,762 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 30 WA * 3 |
コンパイルメッセージ
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:10:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 10 | scanf("%d.%d.%d",&d,&e,&f); | ~~~~~^~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <iostream> #include <cstdio> #include <cmath> using namespace std; int main(){ int a,b,c; int d,e,f; scanf("%d.%d.%d",&a,&b,&c); scanf("%d.%d.%d",&d,&e,&f); int fossil=100*a+10*b+c; int ver = 100*d+10*e+f; if(fossil >= ver)cout << "YES" <<endl; else cout << "NO" << endl; }