結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 175 ms
56,940 KB
testcase_01 WA -
testcase_02 AC 174 ms
56,684 KB
testcase_03 AC 173 ms
56,928 KB
testcase_04 AC 172 ms
57,056 KB
testcase_05 AC 176 ms
56,928 KB
testcase_06 AC 173 ms
56,948 KB
testcase_07 AC 173 ms
56,956 KB
testcase_08 AC 172 ms
57,364 KB
testcase_09 AC 172 ms
57,168 KB
testcase_10 AC 175 ms
57,132 KB
testcase_11 AC 175 ms
56,732 KB
testcase_12 AC 172 ms
57,104 KB
testcase_13 AC 174 ms
56,920 KB
testcase_14 AC 173 ms
57,404 KB
testcase_15 AC 179 ms
56,988 KB
testcase_16 AC 174 ms
56,932 KB
testcase_17 AC 170 ms
57,220 KB
testcase_18 AC 172 ms
57,024 KB
testcase_19 AC 171 ms
57,012 KB
testcase_20 AC 175 ms
57,204 KB
testcase_21 AC 173 ms
57,020 KB
testcase_22 AC 173 ms
56,992 KB
testcase_23 AC 172 ms
56,712 KB
testcase_24 AC 173 ms
56,944 KB
testcase_25 AC 173 ms
59,092 KB
testcase_26 AC 173 ms
56,912 KB
testcase_27 AC 174 ms
57,032 KB
testcase_28 AC 172 ms
56,936 KB
testcase_29 AC 174 ms
56,984 KB
testcase_30 AC 175 ms
56,972 KB
testcase_31 AC 174 ms
57,208 KB
testcase_32 AC 171 ms
56,768 KB
testcase_33 AC 171 ms
56,968 KB
testcase_34 AC 170 ms
56,636 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);
		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