結果

問題 No.652 E869120 and TimeZone
ユーザー 37zigen37zigen
提出日時 2020-03-19 01:34:12
言語 Java19
(openjdk 21)
結果
AC  
実行時間 162 ms / 1,000 ms
コード長 629 bytes
コンパイル時間 2,243 ms
コンパイル使用メモリ 77,092 KB
実行使用メモリ 57,268 KB
最終ジャッジ日時 2023-09-02 05:35:56
合計ジャッジ時間 9,239 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 156 ms
56,940 KB
testcase_01 AC 156 ms
57,264 KB
testcase_02 AC 156 ms
56,924 KB
testcase_03 AC 157 ms
56,976 KB
testcase_04 AC 157 ms
57,128 KB
testcase_05 AC 155 ms
57,268 KB
testcase_06 AC 156 ms
56,860 KB
testcase_07 AC 158 ms
57,072 KB
testcase_08 AC 157 ms
56,984 KB
testcase_09 AC 158 ms
56,776 KB
testcase_10 AC 156 ms
56,984 KB
testcase_11 AC 156 ms
57,024 KB
testcase_12 AC 158 ms
57,028 KB
testcase_13 AC 155 ms
56,736 KB
testcase_14 AC 155 ms
57,148 KB
testcase_15 AC 155 ms
56,944 KB
testcase_16 AC 158 ms
56,736 KB
testcase_17 AC 159 ms
56,756 KB
testcase_18 AC 160 ms
56,960 KB
testcase_19 AC 159 ms
56,812 KB
testcase_20 AC 160 ms
56,940 KB
testcase_21 AC 162 ms
56,676 KB
testcase_22 AC 157 ms
56,900 KB
testcase_23 AC 159 ms
56,912 KB
testcase_24 AC 160 ms
57,124 KB
testcase_25 AC 160 ms
56,976 KB
testcase_26 AC 158 ms
56,916 KB
testcase_27 AC 157 ms
56,888 KB
testcase_28 AC 157 ms
56,968 KB
testcase_29 AC 157 ms
56,864 KB
testcase_30 AC 160 ms
56,900 KB
testcase_31 AC 158 ms
56,732 KB
testcase_32 AC 158 ms
56,660 KB
testcase_33 AC 158 ms
56,824 KB
testcase_34 AC 160 ms
56,916 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(String.format("%02d",h)+":"+String.format("%02d", m));
	}

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