結果

問題 No.525 二度寝の季節
ユーザー yuya178yuya178
提出日時 2017-06-09 22:29:33
言語 Java21
(openjdk 21)
結果
AC  
実行時間 126 ms / 1,000 ms
コード長 630 bytes
コンパイル時間 2,047 ms
コンパイル使用メモリ 82,680 KB
実行使用メモリ 57,592 KB
最終ジャッジ日時 2023-10-23 21:47:57
合計ジャッジ時間 7,425 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
57,380 KB
testcase_01 AC 122 ms
57,480 KB
testcase_02 AC 121 ms
57,496 KB
testcase_03 AC 121 ms
57,536 KB
testcase_04 AC 121 ms
57,532 KB
testcase_05 AC 121 ms
57,524 KB
testcase_06 AC 113 ms
56,208 KB
testcase_07 AC 120 ms
57,516 KB
testcase_08 AC 123 ms
57,472 KB
testcase_09 AC 120 ms
57,344 KB
testcase_10 AC 120 ms
57,352 KB
testcase_11 AC 122 ms
57,424 KB
testcase_12 AC 121 ms
57,312 KB
testcase_13 AC 113 ms
56,256 KB
testcase_14 AC 122 ms
57,156 KB
testcase_15 AC 121 ms
57,376 KB
testcase_16 AC 122 ms
57,572 KB
testcase_17 AC 115 ms
56,560 KB
testcase_18 AC 111 ms
56,144 KB
testcase_19 AC 119 ms
57,208 KB
testcase_20 AC 122 ms
57,448 KB
testcase_21 AC 126 ms
57,504 KB
testcase_22 AC 120 ms
55,524 KB
testcase_23 AC 122 ms
57,452 KB
testcase_24 AC 111 ms
56,128 KB
testcase_25 AC 122 ms
57,476 KB
testcase_26 AC 122 ms
57,592 KB
testcase_27 AC 120 ms
57,404 KB
testcase_28 AC 117 ms
55,440 KB
testcase_29 AC 121 ms
57,076 KB
testcase_30 AC 120 ms
57,176 KB
testcase_31 AC 120 ms
57,432 KB
testcase_32 AC 122 ms
57,552 KB
testcase_33 AC 119 ms
57,296 KB
testcase_34 AC 122 ms
57,428 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);

        String s = sc.next();

        String h = s.substring(0,2);
        String m = s.substring(3,5);

        int hh = Integer.parseInt(h);
        int mm = Integer.parseInt(m);

        int mf=0;

        if(mm<=54){
            mm = mm+5;
        }
        else{
            mm = mm+5-60;
            mf = 1;
        }

        if(mf==1){
            hh = hh+1;
            if(hh==24){
                hh =0;
            }
        }

        System.out.println(String.format("%02d:%02d",hh,mm));



	}
}
0