結果

問題 No.2371 最大の試練それは起床
ユーザー hosinohitohosinohito
提出日時 2023-07-07 21:56:58
言語 JavaScript
(node v21.7.1)
結果
AC  
実行時間 87 ms / 2,000 ms
コード長 732 bytes
コンパイル時間 53 ms
コンパイル使用メモリ 5,332 KB
実行使用メモリ 44,500 KB
最終ジャッジ日時 2023-09-28 23:08:05
合計ジャッジ時間 5,310 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 86 ms
42,636 KB
testcase_01 AC 86 ms
42,640 KB
testcase_02 AC 83 ms
42,564 KB
testcase_03 AC 83 ms
42,576 KB
testcase_04 AC 83 ms
42,420 KB
testcase_05 AC 84 ms
42,568 KB
testcase_06 AC 84 ms
42,712 KB
testcase_07 AC 86 ms
42,408 KB
testcase_08 AC 86 ms
42,612 KB
testcase_09 AC 87 ms
42,560 KB
testcase_10 AC 84 ms
42,700 KB
testcase_11 AC 86 ms
42,480 KB
testcase_12 AC 85 ms
42,564 KB
testcase_13 AC 85 ms
44,500 KB
testcase_14 AC 84 ms
42,588 KB
testcase_15 AC 84 ms
42,420 KB
testcase_16 AC 85 ms
42,552 KB
testcase_17 AC 86 ms
42,740 KB
testcase_18 AC 86 ms
42,628 KB
testcase_19 AC 84 ms
42,500 KB
testcase_20 AC 85 ms
42,568 KB
testcase_21 AC 84 ms
44,456 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

process.stdin.setEncoding("utf8");

var reader = require("readline").createInterface({
  input: process.stdin,
});

const outputYes = ()=>console.log('Yes');
const outputLate = ()=>console.log('Late');
const outputNo = ()=>console.log('No');

reader.on("line", (line) => {
    const inputs = line.split(' ');
    if(inputs[0]<7){
        outputYes();
        return;
    }
    if(inputs[0]==7){
        if(inputs[1]<30){
            outputYes();
        }else{
            outputLate();
        }
        return;
    }
    if(inputs[0]==8){
        if(inputs[1]<30){
            outputLate();
        }else{
            outputNo();
        }
        return;
    }
    if(inputs[0]>8){
        outputNo();
        return;
    }
});

0