結果
問題 | No.525 二度寝の季節 |
ユーザー |
|
提出日時 | 2018-02-16 22:23:18 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 179 ms / 1,000 ms |
コード長 | 544 bytes |
コンパイル時間 | 3,624 ms |
コンパイル使用メモリ | 76,668 KB |
実行使用メモリ | 42,664 KB |
最終ジャッジ日時 | 2024-06-23 02:37:30 |
合計ジャッジ時間 | 10,053 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 33 |
ソースコード
package m.shin; import java.util.Scanner; public class Con525 { public static void main(String[] args) { Scanner s = new Scanner(System.in); String str = s.nextLine(); s.close(); int h = Integer.parseInt(str.substring(0,2)); int m = Integer.parseInt(str.substring(3,5)); if(m > 54){ h = (h + 1) % 24; } m = (m + 5) % 60; if(h < 10){ str = "0" + h + ":"; }else{ str = Integer.toString(h) + ":"; } if(m < 10){ str += "0" + m; }else{ str += Integer.toString(m); } System.out.println(str); } }