結果

問題 No.525 二度寝の季節
ユーザー gu_21816943gu_21816943
提出日時 2017-06-25 16:01:32
言語 Java21
(openjdk 21)
結果
AC  
実行時間 155 ms / 1,000 ms
コード長 537 bytes
コンパイル時間 2,538 ms
コンパイル使用メモリ 79,824 KB
実行使用メモリ 55,140 KB
最終ジャッジ日時 2024-10-04 08:45:03
合計ジャッジ時間 7,827 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 134 ms
55,140 KB
testcase_01 AC 128 ms
54,344 KB
testcase_02 AC 135 ms
55,032 KB
testcase_03 AC 118 ms
54,196 KB
testcase_04 AC 146 ms
54,772 KB
testcase_05 AC 145 ms
54,936 KB
testcase_06 AC 141 ms
54,696 KB
testcase_07 AC 136 ms
54,840 KB
testcase_08 AC 139 ms
54,600 KB
testcase_09 AC 144 ms
55,028 KB
testcase_10 AC 152 ms
54,796 KB
testcase_11 AC 133 ms
54,788 KB
testcase_12 AC 120 ms
54,400 KB
testcase_13 AC 137 ms
54,900 KB
testcase_14 AC 132 ms
54,752 KB
testcase_15 AC 136 ms
54,840 KB
testcase_16 AC 124 ms
54,508 KB
testcase_17 AC 140 ms
54,548 KB
testcase_18 AC 152 ms
54,728 KB
testcase_19 AC 155 ms
54,812 KB
testcase_20 AC 141 ms
54,580 KB
testcase_21 AC 134 ms
55,120 KB
testcase_22 AC 145 ms
54,840 KB
testcase_23 AC 152 ms
54,760 KB
testcase_24 AC 136 ms
54,832 KB
testcase_25 AC 122 ms
54,620 KB
testcase_26 AC 121 ms
54,584 KB
testcase_27 AC 132 ms
54,204 KB
testcase_28 AC 135 ms
54,764 KB
testcase_29 AC 131 ms
54,636 KB
testcase_30 AC 133 ms
54,540 KB
testcase_31 AC 123 ms
54,616 KB
testcase_32 AC 133 ms
54,576 KB
testcase_33 AC 121 ms
54,328 KB
testcase_34 AC 134 ms
54,944 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String str=sc.nextLine();
		sc.close();

		int hour=Integer.parseInt(str.substring(0,2));
		int min=Integer.parseInt(str.substring(3));
		min+=5;
		if(min>=60){
			min-=60;
			hour+=1;
			if(hour>=24){
				hour-=24;
			}
		}

		String result="";
		if(hour<10){
			result+="0"+hour;
		}else{
			result+=hour;
		}
		if(min<10){
			result+=":0"+min;
		}else{
			result+=":"+min;
		}
		System.out.println(result);
	}
}
0