結果

問題 No.525 二度寝の季節
ユーザー samplelpmassamplelpmas
提出日時 2017-06-11 21:44:45
言語 Java21
(openjdk 21)
結果
AC  
実行時間 129 ms / 1,000 ms
コード長 516 bytes
コンパイル時間 2,151 ms
コンパイル使用メモリ 75,172 KB
実行使用メモリ 57,720 KB
最終ジャッジ日時 2023-10-24 21:23:38
合計ジャッジ時間 7,528 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
57,512 KB
testcase_01 AC 126 ms
57,564 KB
testcase_02 AC 124 ms
57,568 KB
testcase_03 AC 126 ms
57,408 KB
testcase_04 AC 121 ms
57,536 KB
testcase_05 AC 125 ms
55,712 KB
testcase_06 AC 122 ms
57,528 KB
testcase_07 AC 123 ms
57,508 KB
testcase_08 AC 123 ms
57,244 KB
testcase_09 AC 122 ms
57,492 KB
testcase_10 AC 125 ms
57,372 KB
testcase_11 AC 120 ms
57,304 KB
testcase_12 AC 121 ms
57,276 KB
testcase_13 AC 127 ms
57,476 KB
testcase_14 AC 121 ms
57,644 KB
testcase_15 AC 125 ms
57,488 KB
testcase_16 AC 125 ms
57,500 KB
testcase_17 AC 122 ms
57,532 KB
testcase_18 AC 122 ms
57,560 KB
testcase_19 AC 121 ms
57,216 KB
testcase_20 AC 124 ms
57,412 KB
testcase_21 AC 121 ms
57,500 KB
testcase_22 AC 129 ms
57,324 KB
testcase_23 AC 123 ms
57,720 KB
testcase_24 AC 123 ms
57,552 KB
testcase_25 AC 121 ms
57,476 KB
testcase_26 AC 121 ms
57,256 KB
testcase_27 AC 121 ms
57,260 KB
testcase_28 AC 110 ms
56,264 KB
testcase_29 AC 125 ms
55,696 KB
testcase_30 AC 124 ms
57,604 KB
testcase_31 AC 112 ms
56,320 KB
testcase_32 AC 122 ms
57,528 KB
testcase_33 AC 122 ms
57,648 KB
testcase_34 AC 123 ms
57,584 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        String[] input = sc.next().split(":");
        int hour = Integer.parseInt(input[0]);
        int minute = Integer.parseInt(input[1]);

        minute += 5;

        if (minute >= 60) {
            hour++;
            minute -= 60;
        }

        if (hour >= 24) {
            hour %= 24;
        }

        System.out.printf("%02d:%02d", hour, minute);

    }

}
0