結果

問題 No.525 二度寝の季節
ユーザー gu_21816943gu_21816943
提出日時 2017-06-25 16:01:32
言語 Java21
(openjdk 21)
結果
AC  
実行時間 179 ms / 1,000 ms
コード長 537 bytes
コンパイル時間 2,307 ms
コンパイル使用メモリ 76,396 KB
実行使用メモリ 55,312 KB
最終ジャッジ日時 2024-04-15 01:26:40
合計ジャッジ時間 9,388 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 166 ms
54,988 KB
testcase_01 AC 171 ms
54,868 KB
testcase_02 AC 165 ms
54,860 KB
testcase_03 AC 165 ms
54,992 KB
testcase_04 AC 168 ms
54,956 KB
testcase_05 AC 164 ms
54,828 KB
testcase_06 AC 167 ms
54,956 KB
testcase_07 AC 172 ms
55,028 KB
testcase_08 AC 171 ms
55,312 KB
testcase_09 AC 169 ms
54,976 KB
testcase_10 AC 168 ms
54,764 KB
testcase_11 AC 169 ms
54,940 KB
testcase_12 AC 170 ms
55,160 KB
testcase_13 AC 166 ms
54,988 KB
testcase_14 AC 179 ms
55,100 KB
testcase_15 AC 173 ms
55,040 KB
testcase_16 AC 171 ms
55,076 KB
testcase_17 AC 173 ms
55,056 KB
testcase_18 AC 169 ms
55,220 KB
testcase_19 AC 167 ms
55,176 KB
testcase_20 AC 169 ms
55,092 KB
testcase_21 AC 168 ms
55,040 KB
testcase_22 AC 169 ms
54,880 KB
testcase_23 AC 166 ms
54,776 KB
testcase_24 AC 168 ms
54,932 KB
testcase_25 AC 166 ms
55,208 KB
testcase_26 AC 167 ms
55,228 KB
testcase_27 AC 167 ms
55,192 KB
testcase_28 AC 166 ms
55,168 KB
testcase_29 AC 165 ms
55,164 KB
testcase_30 AC 166 ms
55,172 KB
testcase_31 AC 168 ms
54,976 KB
testcase_32 AC 168 ms
55,124 KB
testcase_33 AC 169 ms
55,044 KB
testcase_34 AC 169 ms
54,936 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