結果

問題 No.652 E869120 and TimeZone
ユーザー 37zigen37zigen
提出日時 2020-03-19 01:32:17
言語 Java21
(openjdk 21)
結果
AC  
実行時間 180 ms / 1,000 ms
コード長 612 bytes
コンパイル時間 2,700 ms
コンパイル使用メモリ 74,728 KB
実行使用メモリ 57,248 KB
最終ジャッジ日時 2023-09-02 05:35:29
合計ジャッジ時間 10,318 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 169 ms
57,080 KB
testcase_01 AC 169 ms
56,892 KB
testcase_02 AC 171 ms
56,960 KB
testcase_03 AC 180 ms
56,820 KB
testcase_04 AC 176 ms
57,248 KB
testcase_05 AC 177 ms
56,872 KB
testcase_06 AC 175 ms
56,740 KB
testcase_07 AC 173 ms
56,960 KB
testcase_08 AC 167 ms
54,936 KB
testcase_09 AC 167 ms
56,992 KB
testcase_10 AC 168 ms
56,984 KB
testcase_11 AC 169 ms
56,756 KB
testcase_12 AC 171 ms
56,764 KB
testcase_13 AC 170 ms
56,744 KB
testcase_14 AC 171 ms
57,004 KB
testcase_15 AC 169 ms
56,980 KB
testcase_16 AC 169 ms
57,036 KB
testcase_17 AC 169 ms
56,744 KB
testcase_18 AC 174 ms
56,744 KB
testcase_19 AC 175 ms
56,900 KB
testcase_20 AC 177 ms
57,140 KB
testcase_21 AC 168 ms
56,792 KB
testcase_22 AC 170 ms
57,144 KB
testcase_23 AC 168 ms
57,036 KB
testcase_24 AC 169 ms
56,872 KB
testcase_25 AC 171 ms
57,032 KB
testcase_26 AC 172 ms
55,048 KB
testcase_27 AC 169 ms
56,816 KB
testcase_28 AC 171 ms
56,888 KB
testcase_29 AC 171 ms
57,000 KB
testcase_30 AC 171 ms
57,080 KB
testcase_31 AC 170 ms
56,712 KB
testcase_32 AC 176 ms
57,096 KB
testcase_33 AC 173 ms
56,784 KB
testcase_34 AC 175 ms
56,848 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.ArrayDeque;
import java.util.Arrays;
import java.util.Scanner;

class Main {

	public static void main(String[] args) {
		new Main().run();
	}
	
	void run() {
		Scanner sc = new Scanner(System.in);
		int h=sc.nextInt();
		int m=sc.nextInt();
		String str=sc.next();
		str=str.substring(3, str.length());
		int add_m=(int)(Math.round(Double.valueOf(str)*60));
		m+=add_m;
		h=(h+m/60-9+24)%24;
		m%=60;
		if(m<0) {
			m+=60;
			h=(h-1+24)%24;
		}
		System.out.println((h<10?"0":"")+h+":"+(m<10?"0":"")+m);
	}

	void tr(Object... objects) {
		System.out.println(Arrays.deepToString(objects));
	}
}
0