結果

問題 No.998 Four Integers
ユーザー nzn-mnzn-m
提出日時 2020-03-19 12:24:21
言語 JavaScript
(node v21.7.1)
結果
WA  
実行時間 -
コード長 324 bytes
コンパイル時間 420 ms
コンパイル使用メモリ 5,376 KB
実行使用メモリ 38,912 KB
最終ジャッジ日時 2024-04-21 03:14:49
合計ジャッジ時間 2,658 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 59 ms
38,912 KB
testcase_02 AC 55 ms
38,400 KB
testcase_03 AC 54 ms
38,656 KB
testcase_04 AC 83 ms
38,656 KB
testcase_05 AC 57 ms
38,400 KB
testcase_06 AC 56 ms
38,656 KB
testcase_07 AC 56 ms
38,528 KB
testcase_08 AC 56 ms
38,784 KB
testcase_09 AC 57 ms
38,912 KB
testcase_10 AC 58 ms
38,656 KB
testcase_11 AC 57 ms
38,656 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 56 ms
38,656 KB
testcase_18 AC 57 ms
38,912 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 58 ms
38,656 KB
testcase_22 AC 58 ms
38,912 KB
testcase_23 AC 57 ms
38,784 KB
testcase_24 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

var answer = function(A,B,C,D){
    var arr = [A,B,C,D];
    arr.sort();
    var numA = arr[0];
    var numB = arr[1];
    var numC = arr[2];
    var numD = arr[3];
    if(numD - numC == 1 && numC - numB == 1 && numB - numA == 1){
        console.log('Yes');
    } else {
        console.log('No');
    }
}

answer(5,7,3,9);
0