結果

問題 No.525 二度寝の季節
ユーザー samplelpmassamplelpmas
提出日時 2017-06-11 21:24:51
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 518 bytes
コンパイル時間 2,009 ms
コンパイル使用メモリ 74,536 KB
実行使用メモリ 57,720 KB
最終ジャッジ日時 2023-10-24 21:23:15
合計ジャッジ時間 6,935 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 118 ms
57,176 KB
testcase_01 WA -
testcase_02 AC 110 ms
56,260 KB
testcase_03 AC 115 ms
57,200 KB
testcase_04 AC 116 ms
57,068 KB
testcase_05 AC 118 ms
57,388 KB
testcase_06 AC 112 ms
56,280 KB
testcase_07 AC 106 ms
56,176 KB
testcase_08 AC 116 ms
57,576 KB
testcase_09 AC 118 ms
57,468 KB
testcase_10 AC 115 ms
57,204 KB
testcase_11 AC 100 ms
55,728 KB
testcase_12 AC 116 ms
57,468 KB
testcase_13 AC 117 ms
57,284 KB
testcase_14 AC 115 ms
57,320 KB
testcase_15 AC 114 ms
57,172 KB
testcase_16 AC 117 ms
57,124 KB
testcase_17 AC 116 ms
57,288 KB
testcase_18 AC 117 ms
57,464 KB
testcase_19 AC 115 ms
57,348 KB
testcase_20 AC 107 ms
56,220 KB
testcase_21 AC 115 ms
57,288 KB
testcase_22 AC 124 ms
55,504 KB
testcase_23 AC 123 ms
57,548 KB
testcase_24 AC 115 ms
56,268 KB
testcase_25 AC 111 ms
56,612 KB
testcase_26 AC 112 ms
56,224 KB
testcase_27 AC 107 ms
56,224 KB
testcase_28 AC 116 ms
57,436 KB
testcase_29 AC 117 ms
57,280 KB
testcase_30 AC 118 ms
57,424 KB
testcase_31 AC 107 ms
56,168 KB
testcase_32 WA -
testcase_33 AC 116 ms
57,344 KB
testcase_34 WA -
権限があれば一括ダウンロードができます

ソースコード

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) {
            minute %= 24;
        }

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

    }

}
0