結果
問題 |
No.525 二度寝の季節
|
ユーザー |
![]() |
提出日時 | 2018-04-25 00:09:01 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 130 ms / 1,000 ms |
コード長 | 538 bytes |
コンパイル時間 | 2,204 ms |
コンパイル使用メモリ | 74,640 KB |
実行使用メモリ | 54,424 KB |
最終ジャッジ日時 | 2024-06-27 20:42:29 |
合計ジャッジ時間 | 7,716 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 33 |
ソースコード
import java.util.*; class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); String t = in.next(); int h = Integer.parseInt(t.substring(0,2)); int m = Integer.parseInt(t.substring(3,5)); if(m >= 55) { m = m + 5 - 60; if(h == 23) h = 0; else h++; } else { m += 5; } String ans = String.format("%02d:%02d", h, m); System.out.println(ans); } }