結果

問題 No.525 二度寝の季節
ユーザー shinwisteriashinwisteria
提出日時 2018-02-16 22:23:18
言語 Java21
(openjdk 21)
結果
AC  
実行時間 179 ms / 1,000 ms
コード長 544 bytes
コンパイル時間 3,624 ms
コンパイル使用メモリ 76,668 KB
実行使用メモリ 42,664 KB
最終ジャッジ日時 2024-06-23 02:37:30
合計ジャッジ時間 10,053 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 179 ms
42,368 KB
testcase_01 AC 160 ms
42,528 KB
testcase_02 AC 174 ms
42,404 KB
testcase_03 AC 140 ms
41,608 KB
testcase_04 AC 140 ms
41,656 KB
testcase_05 AC 130 ms
40,196 KB
testcase_06 AC 128 ms
41,640 KB
testcase_07 AC 147 ms
41,892 KB
testcase_08 AC 147 ms
41,260 KB
testcase_09 AC 141 ms
41,472 KB
testcase_10 AC 135 ms
41,400 KB
testcase_11 AC 142 ms
41,236 KB
testcase_12 AC 142 ms
41,388 KB
testcase_13 AC 148 ms
41,512 KB
testcase_14 AC 153 ms
41,404 KB
testcase_15 AC 151 ms
41,384 KB
testcase_16 AC 143 ms
41,524 KB
testcase_17 AC 127 ms
40,916 KB
testcase_18 AC 127 ms
41,344 KB
testcase_19 AC 126 ms
41,232 KB
testcase_20 AC 127 ms
40,976 KB
testcase_21 AC 129 ms
41,408 KB
testcase_22 AC 131 ms
41,480 KB
testcase_23 AC 127 ms
41,052 KB
testcase_24 AC 164 ms
42,156 KB
testcase_25 AC 131 ms
41,412 KB
testcase_26 AC 126 ms
41,412 KB
testcase_27 AC 151 ms
42,156 KB
testcase_28 AC 132 ms
41,092 KB
testcase_29 AC 127 ms
41,244 KB
testcase_30 AC 128 ms
40,832 KB
testcase_31 AC 128 ms
40,968 KB
testcase_32 AC 166 ms
42,664 KB
testcase_33 AC 150 ms
41,524 KB
testcase_34 AC 163 ms
42,400 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