結果

問題 No.652 E869120 and TimeZone
ユーザー ohagi_1182ohagi_1182
提出日時 2018-02-23 23:46:00
言語 Java21
(openjdk 21)
結果
AC  
実行時間 119 ms / 1,000 ms
コード長 641 bytes
コンパイル時間 1,989 ms
コンパイル使用メモリ 72,068 KB
実行使用メモリ 57,392 KB
最終ジャッジ日時 2023-09-02 05:23:33
合計ジャッジ時間 7,618 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 119 ms
55,660 KB
testcase_01 AC 116 ms
56,024 KB
testcase_02 AC 114 ms
56,088 KB
testcase_03 AC 115 ms
55,324 KB
testcase_04 AC 112 ms
55,724 KB
testcase_05 AC 119 ms
54,520 KB
testcase_06 AC 117 ms
55,572 KB
testcase_07 AC 119 ms
56,128 KB
testcase_08 AC 114 ms
56,028 KB
testcase_09 AC 114 ms
55,620 KB
testcase_10 AC 113 ms
56,092 KB
testcase_11 AC 117 ms
56,100 KB
testcase_12 AC 117 ms
56,304 KB
testcase_13 AC 116 ms
56,240 KB
testcase_14 AC 111 ms
55,412 KB
testcase_15 AC 114 ms
55,612 KB
testcase_16 AC 115 ms
57,392 KB
testcase_17 AC 112 ms
55,620 KB
testcase_18 AC 112 ms
55,616 KB
testcase_19 AC 114 ms
56,096 KB
testcase_20 AC 119 ms
55,896 KB
testcase_21 AC 116 ms
54,056 KB
testcase_22 AC 113 ms
56,092 KB
testcase_23 AC 115 ms
56,128 KB
testcase_24 AC 119 ms
56,116 KB
testcase_25 AC 119 ms
56,208 KB
testcase_26 AC 111 ms
55,452 KB
testcase_27 AC 116 ms
55,832 KB
testcase_28 AC 117 ms
56,120 KB
testcase_29 AC 119 ms
56,076 KB
testcase_30 AC 111 ms
56,124 KB
testcase_31 AC 113 ms
56,128 KB
testcase_32 AC 115 ms
55,676 KB
testcase_33 AC 114 ms
55,608 KB
testcase_34 AC 117 ms
55,808 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		String s = sc.next().substring(3);
		double zisa;
		int allMinute;
		if(s.charAt(0) == '+') {
			zisa = Double.valueOf(s.substring(1)) - 9.0;
			allMinute = (int)(24 * 60 * 60.0 + zisa * 60.0 + a * 60.0 + b * 1.0) % (24 * 60 * 60);
		} else {
			zisa = Double.valueOf(s.substring(1)) + 9.0;
			allMinute = (int)(24 * 60 * 60.0 - zisa * 60.0 + a * 60.0 + b * 1.0) % (24 * 60 * 60);
		}
		System.out.printf("%02d:%02d", allMinute / 60 % 24, allMinute % 60);

	}

}
0