結果
問題 | No.525 二度寝の季節 |
ユーザー |
![]() |
提出日時 | 2021-02-15 00:14:59 |
言語 | TypeScript (5.7.2) |
結果 |
WA
|
実行時間 | - |
コード長 | 875 bytes |
コンパイル時間 | 7,900 ms |
コンパイル使用メモリ | 228,932 KB |
実行使用メモリ | 41,328 KB |
最終ジャッジ日時 | 2024-12-31 16:26:06 |
合計ジャッジ時間 | 11,096 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 31 WA * 2 |
ソースコード
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 = hh + 1; mm = (mm + 5) - 60; console.log("0" + String(hh) + ':' + "0" + String(mm)); } } else if (String(hh).length === 1 && String(mm + 5).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 + 5).length === 1) { mm = mm + 5; console.log(String(hh) + ':' + "0" +String(mm)); }else { mm = mm + 5; console.log(String(hh) + ':' + String(mm)); }