結果
問題 |
No.138 化石のバージョン
|
ユーザー |
![]() |
提出日時 | 2015-06-22 17:51:41 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 313 bytes |
コンパイル時間 | 91 ms |
コンパイル使用メモリ | 22,272 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-07 16:31:45 |
合計ジャッジ時間 | 894 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | WA * 33 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:6:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 6 | scanf("%d.%d.%d", &a, &b, &c); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ main.cpp:7:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 7 | scanf("%d.%d.%d", &a1, &b2, &c3); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include<stdio.h> int main(void){ int a, b, c; int a1, b2, c3; scanf("%d.%d.%d", &a, &b, &c); scanf("%d.%d.%d", &a1, &b2, &c3); if(a > a1){ printf("yes"); }else if(a == a1 && b > b2){ printf("yes"); }else if(a == a1 && b == b2 && c >= c3){ printf("yes"); }else{ printf("no"); } return 0; }