結果

問題 No.138 化石のバージョン
ユーザー カルロスカルロス
提出日時 2015-09-04 13:37:30
言語 C90
(gcc 12.3.0)
結果
WA  
実行時間 -
コード長 510 bytes
コンパイル時間 98 ms
コンパイル使用メモリ 19,968 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-07-18 23:41:16
合計ジャッジ時間 1,106 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 29 WA * 4
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:5:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    5 |     scanf("%d.%d.%d", &a0, &b0, &c0);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.c:6:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    6 |     scanf("%d.%d.%d", &a1, &b1, &c1);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

ソースコード

diff #

#include <stdio.h>

int main(void){
    int a0, b0, c0, a1, b1, c1;
    scanf("%d.%d.%d", &a0, &b0, &c0);
    scanf("%d.%d.%d", &a1, &b1, &c1);
    if(a1<a0){
        printf("YES\n");
    }else if(a1==a0){
        if(b1<b0){
            printf("YES\n");
        }else if(b1==b0){
            if(c1<c0){
                printf("YES\n");
            }else{
                printf("NO\n");
            }
        }else{
            printf("NO\n");
        }
    }else{
        printf("NO\n");
    }
    return 0;
}
0