結果
| 問題 |
No.525 二度寝の季節
|
| コンテスト | |
| ユーザー |
megane_anko
|
| 提出日時 | 2021-02-14 23:56:16 |
| 言語 | TypeScript (5.7.2) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 605 bytes |
| コンパイル時間 | 8,003 ms |
| コンパイル使用メモリ | 228,576 KB |
| 実行使用メモリ | 41,464 KB |
| 最終ジャッジ日時 | 2024-12-31 16:25:39 |
| 合計ジャッジ時間 | 11,179 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 29 WA * 4 |
ソースコード
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) {
mm = mm + 5;
console.log("0" +String(hh) + ':' + String(mm));
} else {
mm = mm + 5;
console.log(String(hh) + ':' + String(mm));
}
megane_anko