結果

問題 No.208 王将
ユーザー カルロス
提出日時 2015-09-19 12:08:55
言語 C90
(gcc 12.3.0)
結果
WA  
実行時間 -
コード長 256 bytes
コンパイル時間 82 ms
コンパイル使用メモリ 19,968 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-19 07:54:15
合計ジャッジ時間 904 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 19 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 %d", &x1, &y1, &x2, &y2);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

ソースコード

diff #

#include <stdio.h>

int main(void){
    int x1, y1, x2, y2;
    scanf("%d %d %d %d", &x1, &y1, &x2, &y2);
    if(x1<0) x1 *= -1;
    if(y1<0) y1 *= -1;
    if(x1>=y1){
        printf("%d\n", x1);
    }else{
        printf("%d\n", y1);
    }
    return 0;
}
0