結果

問題 No.525 二度寝の季節
ユーザー Amanita2016Amanita2016
提出日時 2017-06-27 17:10:59
言語 Java21
(openjdk 21)
結果
AC  
実行時間 185 ms / 1,000 ms
コード長 610 bytes
コンパイル時間 2,439 ms
コンパイル使用メモリ 77,072 KB
実行使用メモリ 55,436 KB
最終ジャッジ日時 2024-04-15 02:45:47
合計ジャッジ時間 9,753 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 178 ms
55,312 KB
testcase_01 AC 176 ms
55,208 KB
testcase_02 AC 177 ms
55,088 KB
testcase_03 AC 179 ms
55,288 KB
testcase_04 AC 179 ms
55,256 KB
testcase_05 AC 178 ms
55,156 KB
testcase_06 AC 183 ms
55,436 KB
testcase_07 AC 177 ms
55,044 KB
testcase_08 AC 178 ms
54,924 KB
testcase_09 AC 177 ms
55,268 KB
testcase_10 AC 180 ms
55,068 KB
testcase_11 AC 176 ms
55,072 KB
testcase_12 AC 179 ms
54,960 KB
testcase_13 AC 185 ms
55,100 KB
testcase_14 AC 177 ms
55,116 KB
testcase_15 AC 182 ms
55,132 KB
testcase_16 AC 179 ms
55,140 KB
testcase_17 AC 177 ms
55,228 KB
testcase_18 AC 177 ms
54,816 KB
testcase_19 AC 176 ms
55,080 KB
testcase_20 AC 179 ms
55,068 KB
testcase_21 AC 181 ms
55,244 KB
testcase_22 AC 177 ms
55,308 KB
testcase_23 AC 179 ms
55,308 KB
testcase_24 AC 179 ms
55,424 KB
testcase_25 AC 180 ms
54,968 KB
testcase_26 AC 181 ms
55,208 KB
testcase_27 AC 176 ms
54,852 KB
testcase_28 AC 175 ms
55,112 KB
testcase_29 AC 184 ms
55,164 KB
testcase_30 AC 182 ms
55,272 KB
testcase_31 AC 179 ms
55,216 KB
testcase_32 AC 178 ms
55,348 KB
testcase_33 AC 176 ms
55,080 KB
testcase_34 AC 178 ms
55,388 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package yukicoder;

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		@SuppressWarnings("resource")
		Scanner sc =  new Scanner(System.in);
		String moment = sc.nextLine();
		String[] spl = moment.split(":");
		int hour = Integer.parseInt(spl[0]);
		int minu = Integer.parseInt(spl[1]);
		minu+=5;
		if(minu >= 60){
			minu-=60;
			hour++;
		}
		hour%=24;
		String[] prefix = {"",""};
		if(hour < 10){
			prefix[0] = "0";
		}
		if(minu < 10){
			prefix[1] = "0";
		}
		System.out.println(prefix[0] + hour + ":" + prefix[1] + minu);
	}

}
0