結果

問題 No.525 二度寝の季節
ユーザー YamaKasaYamaKasa
提出日時 2018-05-06 18:36:14
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 978 bytes
コンパイル時間 2,219 ms
コンパイル使用メモリ 76,792 KB
実行使用メモリ 57,228 KB
最終ジャッジ日時 2023-09-10 10:47:49
合計ジャッジ時間 8,577 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 145 ms
56,640 KB
testcase_01 AC 138 ms
55,736 KB
testcase_02 AC 149 ms
56,900 KB
testcase_03 AC 150 ms
56,656 KB
testcase_04 AC 151 ms
57,072 KB
testcase_05 AC 144 ms
56,868 KB
testcase_06 AC 146 ms
56,832 KB
testcase_07 AC 147 ms
57,132 KB
testcase_08 AC 146 ms
56,672 KB
testcase_09 AC 146 ms
56,824 KB
testcase_10 AC 146 ms
56,992 KB
testcase_11 AC 146 ms
56,828 KB
testcase_12 AC 145 ms
57,060 KB
testcase_13 AC 146 ms
57,044 KB
testcase_14 AC 146 ms
56,620 KB
testcase_15 AC 146 ms
56,892 KB
testcase_16 AC 146 ms
56,920 KB
testcase_17 AC 146 ms
56,912 KB
testcase_18 AC 146 ms
56,900 KB
testcase_19 AC 145 ms
57,088 KB
testcase_20 AC 146 ms
56,948 KB
testcase_21 AC 145 ms
56,924 KB
testcase_22 AC 145 ms
57,160 KB
testcase_23 AC 147 ms
56,988 KB
testcase_24 WA -
testcase_25 AC 151 ms
57,100 KB
testcase_26 AC 144 ms
56,928 KB
testcase_27 WA -
testcase_28 AC 145 ms
56,904 KB
testcase_29 AC 145 ms
57,028 KB
testcase_30 AC 146 ms
57,228 KB
testcase_31 AC 146 ms
54,904 KB
testcase_32 AC 133 ms
56,364 KB
testcase_33 AC 146 ms
57,184 KB
testcase_34 AC 134 ms
55,744 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 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