結果

問題 No.652 E869120 and TimeZone
ユーザー GrenacheGrenache
提出日時 2018-03-04 00:40:24
言語 Java21
(openjdk 21)
結果
AC  
実行時間 134 ms / 1,000 ms
コード長 993 bytes
コンパイル時間 6,049 ms
コンパイル使用メモリ 74,752 KB
実行使用メモリ 56,080 KB
最終ジャッジ日時 2023-09-02 05:28:01
合計ジャッジ時間 9,776 ms
ジャッジサーバーID
(参考情報)
judge16 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 131 ms
55,508 KB
testcase_01 AC 132 ms
53,332 KB
testcase_02 AC 132 ms
55,580 KB
testcase_03 AC 130 ms
55,572 KB
testcase_04 AC 131 ms
55,820 KB
testcase_05 AC 131 ms
55,292 KB
testcase_06 AC 130 ms
55,336 KB
testcase_07 AC 132 ms
55,812 KB
testcase_08 AC 132 ms
55,672 KB
testcase_09 AC 132 ms
55,768 KB
testcase_10 AC 133 ms
53,924 KB
testcase_11 AC 132 ms
55,856 KB
testcase_12 AC 132 ms
55,676 KB
testcase_13 AC 134 ms
55,856 KB
testcase_14 AC 133 ms
55,520 KB
testcase_15 AC 131 ms
56,080 KB
testcase_16 AC 131 ms
55,820 KB
testcase_17 AC 131 ms
55,508 KB
testcase_18 AC 132 ms
55,580 KB
testcase_19 AC 131 ms
55,824 KB
testcase_20 AC 130 ms
55,952 KB
testcase_21 AC 132 ms
55,968 KB
testcase_22 AC 129 ms
55,752 KB
testcase_23 AC 132 ms
53,760 KB
testcase_24 AC 131 ms
55,568 KB
testcase_25 AC 131 ms
55,396 KB
testcase_26 AC 130 ms
55,704 KB
testcase_27 AC 130 ms
55,824 KB
testcase_28 AC 132 ms
55,704 KB
testcase_29 AC 131 ms
55,896 KB
testcase_30 AC 130 ms
55,696 KB
testcase_31 AC 131 ms
55,344 KB
testcase_32 AC 131 ms
55,316 KB
testcase_33 AC 131 ms
55,752 KB
testcase_34 AC 133 ms
55,668 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;
import java.util.*;


public class Main_yukicoder652 {

	private static Scanner sc;
	private static Printer pr;

	private static void solve() {
		int a = sc.nextInt();
		int b = sc.nextInt();
		String s = sc.next();

		int sign = s.charAt(3) == '+' ? 1 : -1;
		int c = s.indexOf('.');
		if (c == -1) {
			c = s.length();
		}
		int tz = Integer.parseInt(s.substring(4, c)) * 10;
		if (c < s.length()) {
			tz += Integer.parseInt(s.substring(c + 1, s.length()));
		}
		tz *= sign;

		a = (a - 9 + 24) % 24;

		int jp = a * 60 + b;
		jp *= 10;

		int sq = (jp + tz * 60 + 60 * 24 * 10) % (60 * 24 * 10);
		sq /= 10;

		pr.printf("%02d:%02d\n", sq / 60, sq % 60);
	}

	// ---------------------------------------------------
	public static void main(String[] args) {
		sc = new Scanner(System.in);
		pr = new Printer(System.out);

		solve();

		pr.close();
		sc.close();
	}

	private static class Printer extends PrintWriter {
		Printer(PrintStream out) {
			super(out);
		}
	}
}
0