結果
| 問題 | No.525 二度寝の季節 |
| ユーザー |
|
| 提出日時 | 2019-02-13 17:36:56 |
| 言語 | Java (openjdk 27.0.1.0.3 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 203 ms / 1,000 ms |
| + 766µs | |
| コード長 | 588 bytes |
| 記録 | |
| コンパイル時間 | 1,924 ms |
| コンパイル使用メモリ | 94,252 KB |
| 実行使用メモリ | 52,140 KB |
| 最終ジャッジ日時 | 2026-11-12 12:56:37 |
| 合計ジャッジ時間 | 11,259 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 34 |
ソースコード
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()));
}
}