結果

問題 No.296 n度寝
ユーザー f Oxf Ox
提出日時 2021-05-18 03:56:07
言語 JavaScript
(node v21.7.1)
結果
WA  
実行時間 -
コード長 495 bytes
コンパイル時間 170 ms
コンパイル使用メモリ 5,376 KB
実行使用メモリ 38,912 KB
最終ジャッジ日時 2024-04-16 18:22:15
合計ジャッジ時間 1,990 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 64 ms
38,528 KB
testcase_04 AC 65 ms
38,656 KB
testcase_05 AC 65 ms
38,528 KB
testcase_06 AC 63 ms
38,400 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 63 ms
38,784 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 64 ms
38,912 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;
  }
  if (H>=24) {
    H = H%24;
  }
  console.log(H + "\n" + M);

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