結果

問題 No.525 二度寝の季節
ユーザー FVRChanFVRChan
提出日時 2017-10-03 09:46:05
言語 Java21
(openjdk 21)
結果
AC  
実行時間 181 ms / 1,000 ms
コード長 523 bytes
コンパイル時間 2,355 ms
コンパイル使用メモリ 85,692 KB
実行使用メモリ 55,152 KB
最終ジャッジ日時 2024-04-27 22:36:11
合計ジャッジ時間 9,453 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 139 ms
54,464 KB
testcase_01 AC 152 ms
54,916 KB
testcase_02 AC 150 ms
54,944 KB
testcase_03 AC 155 ms
54,672 KB
testcase_04 AC 140 ms
54,576 KB
testcase_05 AC 153 ms
54,896 KB
testcase_06 AC 152 ms
54,900 KB
testcase_07 AC 151 ms
55,032 KB
testcase_08 AC 151 ms
55,068 KB
testcase_09 AC 154 ms
55,008 KB
testcase_10 AC 153 ms
54,952 KB
testcase_11 AC 151 ms
55,020 KB
testcase_12 AC 152 ms
54,884 KB
testcase_13 AC 152 ms
55,016 KB
testcase_14 AC 151 ms
54,768 KB
testcase_15 AC 154 ms
54,904 KB
testcase_16 AC 154 ms
54,880 KB
testcase_17 AC 151 ms
55,096 KB
testcase_18 AC 154 ms
54,952 KB
testcase_19 AC 153 ms
54,900 KB
testcase_20 AC 150 ms
55,112 KB
testcase_21 AC 151 ms
54,696 KB
testcase_22 AC 151 ms
54,744 KB
testcase_23 AC 152 ms
55,072 KB
testcase_24 AC 153 ms
54,728 KB
testcase_25 AC 137 ms
54,548 KB
testcase_26 AC 152 ms
54,972 KB
testcase_27 AC 150 ms
54,972 KB
testcase_28 AC 152 ms
54,756 KB
testcase_29 AC 181 ms
54,720 KB
testcase_30 AC 177 ms
54,808 KB
testcase_31 AC 179 ms
54,948 KB
testcase_32 AC 155 ms
54,792 KB
testcase_33 AC 155 ms
55,152 KB
testcase_34 AC 156 ms
54,904 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
public class Main{
	private static Scanner sc=new Scanner(System.in);
	public static void main(String args[])throws Exception{
		String time[]=sc.nextLine().split(":");
		int h=Integer.parseInt(time[0]);
		int m=Integer.parseInt(time[1]);
		m+=5;
		if(m>=60){
			m-=60;
			h++;
			if(h==24){
				h-=24;
			}
		}
		time[0]=String.valueOf(h);
		time[1]=String.valueOf(m);
		for(int i=0;i<time.length;i++){
			if(time[i].length()==1)time[i]=0+time[i];
		}System.out.println(time[0]+":"+time[1]);
	}
}
0