結果
| 問題 |
No.525 二度寝の季節
|
| コンテスト | |
| ユーザー |
YamaKasa
|
| 提出日時 | 2018-05-06 18:36:14 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 978 bytes |
| コンパイル時間 | 2,555 ms |
| コンパイル使用メモリ | 80,184 KB |
| 実行使用メモリ | 42,688 KB |
| 最終ジャッジ日時 | 2024-06-28 02:11:02 |
| 合計ジャッジ時間 | 8,715 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 31 WA * 2 |
ソースコード
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
String T = scan.next();
scan.close();
int h;
if(T.charAt(0) == '0') {
h = Integer.parseInt(T.substring(1, 2));
}else {
h = Integer.parseInt(T.substring(0, 2));
}
int m;
if(T.charAt(3) == '0') {
m = Integer.parseInt(T.substring(4, 5));
}else {
m = Integer.parseInt(T.substring(3, 5));
}
if(m > 54) {
if(h == 23) {
int m1 = m + 5 - 60;
System.out.println("00:0" + m1);
}else {
int m1 = m + 5 - 60;
if(h < 9) {
int h1 = h + 1;
System.out.println("0" + h1 + ":0" + m1);
}
}
}else if(m < 4) {
int m1 = m + 5;
if(h < 9) {
System.out.println("0" + h +":0" + m1);
}else {
System.out.println(h + ":0" + m1);
}
}else {
int m1 = m + 5;
if(h < 10) {
System.out.println("0" + h +":" + m1);
}else {
System.out.println(h + ":" + m1);
}
}
}
}
YamaKasa