結果
| 問題 | No.525 二度寝の季節 | 
| コンテスト | |
| ユーザー |  mlpj56d | 
| 提出日時 | 2017-06-19 01:17:47 | 
| 言語 | JavaScript (node v23.5.0) | 
| 結果 | 
                                WA
                                 
                            (最新) 
                                AC
                                 
                            (最初) | 
| 実行時間 | - | 
| コード長 | 852 bytes | 
| コンパイル時間 | 170 ms | 
| コンパイル使用メモリ | 6,820 KB | 
| 実行使用メモリ | 41,588 KB | 
| 最終ジャッジ日時 | 2024-10-13 00:09:34 | 
| 合計ジャッジ時間 | 3,031 ms | 
| ジャッジサーバーID (参考情報) | judge5 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| 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) {
           if( (mm + 5) <= 9 ){
                console.log("0" + hh + ":0" + (mm + 5) + "\n");
            } else {
                console.log("0" + hh + ":" + (mm + 5) + "\n");
            }
       } else {
           console.log( hh + ":" + (mm + 5) + "\n");
       }
   }
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
            
            
            
        