結果

問題 No.652 E869120 and TimeZone
ユーザー 37zigen37zigen
提出日時 2020-03-19 01:30:27
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 605 bytes
コンパイル時間 2,174 ms
コンパイル使用メモリ 80,036 KB
実行使用メモリ 59,028 KB
最終ジャッジ日時 2023-08-20 20:33:27
合計ジャッジ時間 9,955 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 176 ms
56,804 KB
testcase_02 AC 177 ms
56,924 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 175 ms
56,944 KB
testcase_06 AC 174 ms
57,068 KB
testcase_07 AC 176 ms
56,932 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 177 ms
57,088 KB
testcase_13 AC 176 ms
56,592 KB
testcase_14 AC 179 ms
56,784 KB
testcase_15 WA -
testcase_16 AC 177 ms
57,080 KB
testcase_17 AC 174 ms
56,788 KB
testcase_18 AC 178 ms
57,092 KB
testcase_19 WA -
testcase_20 AC 178 ms
56,872 KB
testcase_21 AC 178 ms
56,828 KB
testcase_22 AC 176 ms
56,680 KB
testcase_23 WA -
testcase_24 AC 176 ms
57,252 KB
testcase_25 WA -
testcase_26 AC 179 ms
56,608 KB
testcase_27 WA -
testcase_28 AC 176 ms
57,204 KB
testcase_29 AC 177 ms
57,084 KB
testcase_30 AC 182 ms
56,808 KB
testcase_31 AC 179 ms
57,072 KB
testcase_32 AC 179 ms
56,924 KB
testcase_33 WA -
testcase_34 AC 179 ms
56,800 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)(Double.valueOf(str)*60+1e-6);
		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