結果
問題 | No.138 化石のバージョン |
ユーザー |
![]() |
提出日時 | 2015-07-08 01:01:43 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 229 bytes |
コンパイル時間 | 573 ms |
コンパイル使用メモリ | 55,696 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-12-29 13:25:54 |
合計ジャッジ時間 | 1,564 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 33 |
コンパイルメッセージ
main.cpp: In function ‘int version()’: main.cpp:5:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 5 | scanf("%d.%d.%d", &a, &b, &c); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include<iostream> using namespace std; int version(){ int a, b, c; scanf("%d.%d.%d", &a, &b, &c); return (a * 1000000 + b * 1000 + c); } int main(void){ cout << ((version() >= version()) ? "YES" : "NO") << endl; return 0; }