結果
問題 |
No.525 二度寝の季節
|
ユーザー |
![]() |
提出日時 | 2021-02-15 00:05:09 |
言語 | TypeScript (5.7.2) |
結果 |
WA
|
実行時間 | - |
コード長 | 854 bytes |
コンパイル時間 | 7,754 ms |
コンパイル使用メモリ | 229,084 KB |
実行使用メモリ | 41,204 KB |
最終ジャッジ日時 | 2024-12-31 16:25:44 |
合計ジャッジ時間 | 11,005 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 26 WA * 7 |
ソースコード
import * as fs from 'fs'; const input = fs.readFileSync('/dev/stdin', 'utf8'); const arr = input.split(':'); let hh = parseInt(arr[0]); let mm = parseInt(arr[1]); if (mm >= 55) { if (hh === 23) { //hh = 0o0; mm = (mm + 5) - 60; console.log("00" + ':' + "0" + String(mm)); } else { hh += mm = (mm + 5) - 60; console.log("0" + String(hh) + ':' + String(mm)); } } else if (String(hh).length === 1 && String(mm).length === 1) { mm = mm + 5; console.log("0" +String(hh) + ':' + "0" + String(mm)); } else if (String(hh).length === 1) { mm = mm + 5; console.log("0" +String(hh) + ':' + String(mm)); } else if (String(mm).length === 1) { mm = mm + 5; console.log(String(hh) + ':' + "0" +String(mm)); }else { mm = mm + 5; console.log(String(hh) + ':' + String(mm)); }