結果

問題 No.525 二度寝の季節
ユーザー YukimotoPGYukimotoPG
提出日時 2019-02-13 17:36:56
言語 Java21
(openjdk 21)
結果
AC  
実行時間 206 ms / 1,000 ms
コード長 588 bytes
コンパイル時間 2,043 ms
コンパイル使用メモリ 72,692 KB
実行使用メモリ 58,220 KB
最終ジャッジ日時 2023-10-11 12:20:08
合計ジャッジ時間 10,750 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 200 ms
57,072 KB
testcase_01 AC 187 ms
56,844 KB
testcase_02 AC 195 ms
57,064 KB
testcase_03 AC 187 ms
56,728 KB
testcase_04 AC 197 ms
56,976 KB
testcase_05 AC 202 ms
56,700 KB
testcase_06 AC 200 ms
56,864 KB
testcase_07 AC 199 ms
56,920 KB
testcase_08 AC 197 ms
58,220 KB
testcase_09 AC 197 ms
56,848 KB
testcase_10 AC 197 ms
56,980 KB
testcase_11 AC 197 ms
56,460 KB
testcase_12 AC 197 ms
57,140 KB
testcase_13 AC 197 ms
56,564 KB
testcase_14 AC 188 ms
56,780 KB
testcase_15 AC 199 ms
56,436 KB
testcase_16 AC 185 ms
56,348 KB
testcase_17 AC 188 ms
54,684 KB
testcase_18 AC 195 ms
56,676 KB
testcase_19 AC 200 ms
56,832 KB
testcase_20 AC 185 ms
56,380 KB
testcase_21 AC 197 ms
56,988 KB
testcase_22 AC 197 ms
56,704 KB
testcase_23 AC 188 ms
57,064 KB
testcase_24 AC 196 ms
56,456 KB
testcase_25 AC 188 ms
56,336 KB
testcase_26 AC 198 ms
56,204 KB
testcase_27 AC 197 ms
56,888 KB
testcase_28 AC 197 ms
56,816 KB
testcase_29 AC 195 ms
56,592 KB
testcase_30 AC 206 ms
56,620 KB
testcase_31 AC 186 ms
56,764 KB
testcase_32 AC 191 ms
56,856 KB
testcase_33 AC 197 ms
56,800 KB
testcase_34 AC 203 ms
56,648 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.text.SimpleDateFormat;
import java.util.*;

class Main {
	static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {
		
		Calendar cl = Calendar.getInstance();
		String s = sc.next();
		int h = Integer.parseInt(s.charAt(0)==0?s.substring(1,2):s.substring(0,2));
		int m = Integer.parseInt(s.charAt(3)==0?s.substring(4,5):s.substring(3,5));
		cl.set(Calendar.HOUR_OF_DAY, h);
		cl.set(Calendar.MINUTE, m);
		cl.add(Calendar.MINUTE, 5);
		SimpleDateFormat sdf = new SimpleDateFormat("HH:mm");
		System.out.println(sdf.format(cl.getTime()));
		
		
	}
}
0