結果
| 問題 |
No.525 二度寝の季節
|
| コンテスト | |
| ユーザー |
mlpj56d
|
| 提出日時 | 2017-06-17 18:44:44 |
| 言語 | JavaScript (node v23.5.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 660 bytes |
| コンパイル時間 | 33 ms |
| コンパイル使用メモリ | 5,120 KB |
| 実行使用メモリ | 37,888 KB |
| 最終ジャッジ日時 | 2024-10-13 00:08:49 |
| 合計ジャッジ時間 | 2,985 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 2 |
| other | WA * 33 |
ソースコード
function Main(input) {
var data = input.split(":")
var hh = parseInt(data[0]);
var mm = parseInt(data[1]);
justDoIt(hh,mm);
}
function justDoIt (hh,mm){
if ( mm + 5 > 59) {
if( hh >= 0 && hh <= 8) {
console.log( "0" + (hh + 1) + ":0" + (mm + 5) % 60 + "\n");
} else if ( hh == 23) {
console.log( "00:0" + (mm + 5) % 60 + "\n");
} else {
console.log( (hh + 1) + ":0" + (mm + 5) % 60 + "\n");
}
} else {
if ( hh >= 0 && hh <= 9) {
console.log("0" + hh + ":" + (mm + 5) + "\n");
} else {
console.log( hh + ":" + (mm + 5) + "\n");
}
}
}
mlpj56d