結果

問題 No.1893 Cycle
ユーザー Fullmoon8507Fullmoon8507
提出日時 2022-09-24 14:52:45
言語 JavaScript
(node v21.7.1)
結果
WA  
実行時間 -
コード長 572 bytes
コンパイル時間 70 ms
コンパイル使用メモリ 5,372 KB
実行使用メモリ 42,352 KB
最終ジャッジ日時 2023-08-23 21:24:00
合計ジャッジ時間 3,707 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
42,128 KB
testcase_01 AC 76 ms
42,136 KB
testcase_02 AC 74 ms
42,124 KB
testcase_03 AC 75 ms
42,116 KB
testcase_04 AC 75 ms
42,252 KB
testcase_05 AC 75 ms
42,324 KB
testcase_06 AC 76 ms
42,284 KB
testcase_07 AC 73 ms
42,328 KB
testcase_08 AC 75 ms
42,124 KB
testcase_09 AC 74 ms
42,348 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 75 ms
42,140 KB
testcase_13 AC 75 ms
42,180 KB
testcase_14 AC 74 ms
42,204 KB
testcase_15 AC 74 ms
42,096 KB
testcase_16 AC 75 ms
42,184 KB
testcase_17 AC 75 ms
42,212 KB
testcase_18 WA -
testcase_19 AC 76 ms
42,284 KB
testcase_20 AC 76 ms
42,256 KB
testcase_21 AC 77 ms
42,216 KB
testcase_22 AC 75 ms
42,252 KB
testcase_23 AC 75 ms
42,204 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

function Main(input) {
    'use strict';
    let data = input.split("\n");
    let first_line = data[0].split(" ");
    let second_line = data[1];

    let x = parseInt(first_line[0]);
    let y = parseInt(first_line[1]);

    let z = addCorrect(x+4);
    if (z === y) {
        console.log(addCorrect(z+4));
    } else {
        console.log(z);
    }
}

function addCorrect(num){
    let buf = num + 4;
    if (12 < buf) {
       return buf -= 12;
    } else {
        return buf;
    }
}

// Don't edit this line!
Main(require("fs").readFileSync("/dev/stdin", "utf8")); 
0