結果
問題 |
No.525 二度寝の季節
|
ユーザー |
|
提出日時 | 2019-02-13 17:36:56 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 217 ms / 1,000 ms |
コード長 | 588 bytes |
コンパイル時間 | 4,819 ms |
コンパイル使用メモリ | 76,620 KB |
実行使用メモリ | 55,200 KB |
最終ジャッジ日時 | 2024-09-13 11:08:08 |
合計ジャッジ時間 | 11,102 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 33 |
ソースコード
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())); } }