結果

問題 No.525 二度寝の季節
ユーザー Tsukasa_Type
提出日時 2018-02-10 21:34:57
言語 Java
(openjdk 23)
結果
AC  
実行時間 170 ms / 1,000 ms
コード長 447 bytes
コンパイル時間 3,063 ms
コンパイル使用メモリ 76,300 KB
実行使用メモリ 55,268 KB
最終ジャッジ日時 2024-11-06 08:20:09
合計ジャッジ時間 10,006 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 33
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
	static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {
		String[] s = sc.next().split(":");
		int[] ar = {Integer.parseInt(s[0]),Integer.parseInt(s[1])};
		int minute = ar[0]*60 + ar[1] + 5;
		int h = (minute/60)%24;
		int m = minute%60;
		String ans = "";
		if (h < 10) {ans += "0";}
		ans += h + ":";
		if (m < 10) {ans += "0";}
		ans += m;
		System.out.println(ans);
	}
}
0