結果

問題 No.652 E869120 and TimeZone
ユーザー aaaaasatoriaaaaasatori
提出日時 2018-02-23 23:50:13
言語 Java19
(openjdk 21)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 502 bytes
コンパイル時間 4,958 ms
コンパイル使用メモリ 72,292 KB
実行使用メモリ 57,824 KB
最終ジャッジ日時 2023-08-22 14:27:11
合計ジャッジ時間 9,286 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
56,472 KB
testcase_01 AC 117 ms
56,052 KB
testcase_02 AC 121 ms
56,632 KB
testcase_03 AC 122 ms
56,372 KB
testcase_04 WA -
testcase_05 AC 123 ms
56,456 KB
testcase_06 AC 122 ms
56,420 KB
testcase_07 AC 119 ms
55,852 KB
testcase_08 AC 124 ms
55,604 KB
testcase_09 AC 124 ms
56,760 KB
testcase_10 AC 124 ms
56,036 KB
testcase_11 AC 125 ms
56,236 KB
testcase_12 AC 123 ms
56,196 KB
testcase_13 WA -
testcase_14 AC 123 ms
56,076 KB
testcase_15 AC 123 ms
56,180 KB
testcase_16 AC 123 ms
56,740 KB
testcase_17 AC 121 ms
56,032 KB
testcase_18 AC 123 ms
56,116 KB
testcase_19 AC 122 ms
56,484 KB
testcase_20 AC 120 ms
54,432 KB
testcase_21 AC 122 ms
56,288 KB
testcase_22 AC 123 ms
55,820 KB
testcase_23 AC 124 ms
56,364 KB
testcase_24 AC 123 ms
55,976 KB
testcase_25 AC 121 ms
56,044 KB
testcase_26 AC 119 ms
56,768 KB
testcase_27 AC 121 ms
54,052 KB
testcase_28 AC 122 ms
56,452 KB
testcase_29 AC 123 ms
56,316 KB
testcase_30 AC 122 ms
56,180 KB
testcase_31 AC 122 ms
55,932 KB
testcase_32 AC 123 ms
55,928 KB
testcase_33 AC 123 ms
55,644 KB
testcase_34 AC 122 ms
55,920 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class No652 {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int min = a*60 + b;
		String s = sc.next();
		double utc;
		if(s.charAt(3) == '+') {
			utc = Double.parseDouble(s.substring(4));
		}else {
			utc = Double.parseDouble(s.substring(3));
		}
		min = (int)(min + (utc - 9) * 60) % 1440;
		if(min < 0) {
			min += 1440;
		}
		System.out.printf("%02d:%02d\n",min/60,min%60);
	}
}
0