結果
問題 | No.296 n度寝 |
ユーザー | intercept6 |
提出日時 | 2020-09-17 21:08:47 |
言語 | TypeScript (5.4.3) |
結果 |
WA
|
実行時間 | - |
コード長 | 827 bytes |
コンパイル時間 | 7,697 ms |
コンパイル使用メモリ | 253,876 KB |
実行使用メモリ | 44,388 KB |
最終ジャッジ日時 | 2023-09-04 07:33:29 |
合計ジャッジ時間 | 9,673 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | WA | - |
testcase_02 | WA | - |
testcase_03 | AC | 83 ms
42,256 KB |
testcase_04 | AC | 80 ms
42,256 KB |
testcase_05 | AC | 80 ms
42,276 KB |
testcase_06 | AC | 79 ms
42,212 KB |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | AC | 80 ms
42,176 KB |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | AC | 79 ms
42,300 KB |
testcase_14 | AC | 79 ms
42,348 KB |
testcase_15 | WA | - |
ソースコード
import { readFileSync } from 'fs'; // Nはユキさんが度寝することを示します。 // Hはアラームが最初に鳴る時刻の、24時間制における時の値です。 // Mはアラームが最初に鳴る時刻の、分の値です。 // Tは最初にアラームが鳴った後、アラームが繰り返される間隔の、分単位の値です。 function Main(input: string) { const data = input.split('\n'); const firstLine = data[0].split(' ').map(Number); const N = firstLine[0]; const H = firstLine[1]; const M = firstLine[2]; const T = firstLine[3]; const delayMinutes = (N - 1) * T; const addMinutes = delayMinutes % 60; const addHours = Math.floor(delayMinutes / 60); console.log(H + addHours); console.log(M + addMinutes); } Main(readFileSync('/dev/stdin', 'utf8'));