結果

問題 No.525 二度寝の季節
ユーザー takeya_okinotakeya_okino
提出日時 2017-06-18 16:16:07
言語 Java21
(openjdk 21)
結果
AC  
実行時間 137 ms / 1,000 ms
コード長 606 bytes
コンパイル時間 2,009 ms
コンパイル使用メモリ 76,712 KB
実行使用メモリ 55,232 KB
最終ジャッジ日時 2024-04-09 19:54:34
合計ジャッジ時間 7,513 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 115 ms
54,252 KB
testcase_01 AC 135 ms
54,992 KB
testcase_02 AC 123 ms
54,412 KB
testcase_03 AC 127 ms
55,232 KB
testcase_04 AC 120 ms
55,196 KB
testcase_05 AC 127 ms
54,408 KB
testcase_06 AC 128 ms
55,032 KB
testcase_07 AC 132 ms
54,724 KB
testcase_08 AC 132 ms
55,052 KB
testcase_09 AC 137 ms
54,868 KB
testcase_10 AC 136 ms
55,124 KB
testcase_11 AC 128 ms
55,204 KB
testcase_12 AC 132 ms
55,108 KB
testcase_13 AC 116 ms
54,624 KB
testcase_14 AC 134 ms
54,884 KB
testcase_15 AC 126 ms
54,396 KB
testcase_16 AC 122 ms
54,452 KB
testcase_17 AC 123 ms
54,328 KB
testcase_18 AC 131 ms
54,808 KB
testcase_19 AC 133 ms
54,800 KB
testcase_20 AC 119 ms
54,576 KB
testcase_21 AC 130 ms
54,732 KB
testcase_22 AC 122 ms
54,656 KB
testcase_23 AC 134 ms
55,008 KB
testcase_24 AC 126 ms
54,888 KB
testcase_25 AC 116 ms
54,372 KB
testcase_26 AC 125 ms
55,052 KB
testcase_27 AC 114 ms
54,672 KB
testcase_28 AC 116 ms
54,812 KB
testcase_29 AC 126 ms
55,096 KB
testcase_30 AC 116 ms
54,600 KB
testcase_31 AC 124 ms
55,128 KB
testcase_32 AC 134 ms
54,912 KB
testcase_33 AC 123 ms
54,848 KB
testcase_34 AC 123 ms
54,952 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String T = sc.next();
    String[] s = T.split(":");
    String hh = s[0];
    String mm = s[1];
    int ansh = Integer.parseInt(hh);
    int ansm = Integer.parseInt(mm) + 5;
    if(ansm >= 60) {
      ansh++;
      ansm -= 60;
    }
    if(ansh >= 24) ansh -= 24;
    String anshh = String.valueOf(ansh);
    String ansmm = String.valueOf(ansm);
    if(ansh < 10) anshh = "0" + anshh; 
    if(ansm < 10) ansmm = "0" + ansmm; 
    System.out.println(anshh + ":" + ansmm);
  }
}
0