結果

問題 No.296 n度寝
ユーザー f Oxf Ox
提出日時 2021-05-18 03:51:17
言語 JavaScript
(node v21.7.1)
結果
WA  
実行時間 -
コード長 462 bytes
コンパイル時間 402 ms
コンパイル使用メモリ 7,328 KB
実行使用メモリ 41,336 KB
最終ジャッジ日時 2024-04-16 18:17:07
合計ジャッジ時間 2,110 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 63 ms
39,040 KB
testcase_04 AC 64 ms
39,168 KB
testcase_05 AC 65 ms
38,912 KB
testcase_06 AC 63 ms
39,040 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 65 ms
39,168 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 62 ms
39,040 KB
testcase_14 WA -
testcase_15 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

function Main(input) {
  // let data = input.split("\n");
  let data = input.split(" ");

  let N = Number(data[0]);
  let H = Number(data[1]);
  let M = Number(data[2]);
  let T = Number(data[3]);

  let delayM = (N-1)*T;
  let afterTime = delayM + M;

  if (afterTime<60) {
    M = afterTime;
  } else {
    H = Math.floor(afterTime/60) + H;
    M = afterTime%60 + M;
  }
  console.log(H + "\n" + M);

}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
0