結果

問題 No.525 二度寝の季節
ユーザー YamaKasaYamaKasa
提出日時 2018-05-06 18:38:36
言語 Java21
(openjdk 21)
結果
AC  
実行時間 152 ms / 1,000 ms
コード長 1,052 bytes
コンパイル時間 2,149 ms
コンパイル使用メモリ 76,300 KB
実行使用メモリ 58,572 KB
最終ジャッジ日時 2023-09-10 10:48:01
合計ジャッジ時間 8,796 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 148 ms
56,768 KB
testcase_01 AC 134 ms
55,980 KB
testcase_02 AC 148 ms
56,776 KB
testcase_03 AC 147 ms
56,948 KB
testcase_04 AC 149 ms
56,940 KB
testcase_05 AC 147 ms
56,880 KB
testcase_06 AC 145 ms
56,576 KB
testcase_07 AC 147 ms
57,040 KB
testcase_08 AC 147 ms
56,520 KB
testcase_09 AC 149 ms
56,812 KB
testcase_10 AC 144 ms
56,556 KB
testcase_11 AC 146 ms
56,768 KB
testcase_12 AC 149 ms
56,912 KB
testcase_13 AC 149 ms
56,836 KB
testcase_14 AC 150 ms
56,892 KB
testcase_15 AC 151 ms
56,776 KB
testcase_16 AC 145 ms
56,544 KB
testcase_17 AC 148 ms
56,776 KB
testcase_18 AC 150 ms
56,584 KB
testcase_19 AC 149 ms
58,572 KB
testcase_20 AC 147 ms
56,988 KB
testcase_21 AC 148 ms
56,828 KB
testcase_22 AC 147 ms
56,608 KB
testcase_23 AC 152 ms
56,728 KB
testcase_24 AC 146 ms
56,560 KB
testcase_25 AC 147 ms
56,820 KB
testcase_26 AC 150 ms
57,016 KB
testcase_27 AC 147 ms
56,560 KB
testcase_28 AC 148 ms
56,868 KB
testcase_29 AC 148 ms
56,544 KB
testcase_30 AC 147 ms
56,780 KB
testcase_31 AC 150 ms
56,776 KB
testcase_32 AC 136 ms
55,944 KB
testcase_33 AC 150 ms
56,816 KB
testcase_34 AC 135 ms
55,596 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String T = scan.next();
		scan.close();
		int h;
		if(T.charAt(0) == '0') {
			h = Integer.parseInt(T.substring(1, 2));
		}else {
			h = Integer.parseInt(T.substring(0, 2));
		}
		int m;
		if(T.charAt(3) == '0') {
			m = Integer.parseInt(T.substring(4, 5));
		}else {
			m = Integer.parseInt(T.substring(3, 5));
		}
		if(m > 54) {
			if(h == 23) {
				int m1 = m + 5 - 60;
				System.out.println("00:0" + m1);
			}else {
				int m1 = m + 5 - 60;
				if(h < 9) {
					int h1 = h + 1;
					System.out.println("0" + h1 + ":0" + m1);
				}else {
					int h1 = h + 1;
					System.out.println(h1 + ":0" + m1);
				}

			}
		}else if(m < 4) {
			int m1 = m + 5;
			if(h < 9) {
				System.out.println("0" + h +":0" + m1);
			}else {
				System.out.println(h + ":0" + m1);
			}
		}else {
			int m1 = m + 5;
			if(h < 10) {
				System.out.println("0" + h +":" + m1);
			}else {
				System.out.println(h + ":" + m1);
			}
		}

	}
}
0