結果
問題 | No.138 化石のバージョン |
ユーザー |
![]() |
提出日時 | 2015-01-29 23:39:06 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 5,000 ms |
コード長 | 453 bytes |
コンパイル時間 | 560 ms |
コンパイル使用メモリ | 21,120 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-29 12:53:23 |
合計ジャッジ時間 | 1,198 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 33 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:9:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 9 | scanf("%i.%i.%i",&ka,&kb,&kc); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ main.c:12:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 12 | scanf("%i.%i.%i",&a,&b,&c); | ^~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h> #include <stdlib.h> #include <string.h> int main() { int ka,kb,kc; scanf("%i.%i.%i",&ka,&kb,&kc); int a,b,c; scanf("%i.%i.%i",&a,&b,&c); char ans[256] = "NO"; if (ka>a) strcpy(ans, "YES"); else if(ka==a) { if (kb>b) strcpy(ans, "YES"); else if(kb==b){ if (kc>=c) strcpy(ans, "YES"); } } printf("%s",ans); return 0; }