結果

問題 No.525 二度寝の季節
ユーザー shinwisteriashinwisteria
提出日時 2018-02-16 22:23:18
言語 Java21
(openjdk 21)
結果
AC  
実行時間 176 ms / 1,000 ms
コード長 544 bytes
コンパイル時間 4,413 ms
コンパイル使用メモリ 74,436 KB
実行使用メモリ 57,888 KB
最終ジャッジ日時 2023-09-05 06:14:39
合計ジャッジ時間 10,924 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 175 ms
56,572 KB
testcase_01 AC 175 ms
56,608 KB
testcase_02 AC 176 ms
57,020 KB
testcase_03 AC 145 ms
53,800 KB
testcase_04 AC 145 ms
54,208 KB
testcase_05 AC 145 ms
56,080 KB
testcase_06 AC 145 ms
55,912 KB
testcase_07 AC 145 ms
55,584 KB
testcase_08 AC 142 ms
55,852 KB
testcase_09 AC 144 ms
56,072 KB
testcase_10 AC 142 ms
55,840 KB
testcase_11 AC 143 ms
55,592 KB
testcase_12 AC 141 ms
55,904 KB
testcase_13 AC 141 ms
55,620 KB
testcase_14 AC 141 ms
55,776 KB
testcase_15 AC 143 ms
56,172 KB
testcase_16 AC 144 ms
55,648 KB
testcase_17 AC 130 ms
55,804 KB
testcase_18 AC 128 ms
56,060 KB
testcase_19 AC 128 ms
55,744 KB
testcase_20 AC 129 ms
56,040 KB
testcase_21 AC 130 ms
56,140 KB
testcase_22 AC 129 ms
55,540 KB
testcase_23 AC 130 ms
55,840 KB
testcase_24 AC 164 ms
56,784 KB
testcase_25 AC 128 ms
55,708 KB
testcase_26 AC 128 ms
55,712 KB
testcase_27 AC 163 ms
56,788 KB
testcase_28 AC 129 ms
56,020 KB
testcase_29 AC 127 ms
55,704 KB
testcase_30 AC 128 ms
57,888 KB
testcase_31 AC 128 ms
56,140 KB
testcase_32 AC 174 ms
56,592 KB
testcase_33 AC 146 ms
55,976 KB
testcase_34 AC 174 ms
56,836 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package m.shin;
import java.util.Scanner;
public class Con525 {

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		String str = s.nextLine();
		s.close();
		int h = Integer.parseInt(str.substring(0,2));
		int m = Integer.parseInt(str.substring(3,5));

		if(m > 54){
			h = (h + 1) % 24;
		}
		m = (m + 5) % 60;

		if(h < 10){
			str = "0" + h + ":";
		}else{
			str = Integer.toString(h) + ":";
		}
		if(m < 10){
			str += "0" + m;
		}else{
			str += Integer.toString(m);
		}

		System.out.println(str);


	}

}
0