結果

問題 No.652 E869120 and TimeZone
ユーザー Freed_0929Freed_0929
提出日時 2018-02-23 22:56:01
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 851 bytes
コンパイル時間 2,896 ms
コンパイル使用メモリ 78,172 KB
実行使用メモリ 59,456 KB
最終ジャッジ日時 2023-08-22 14:16:00
合計ジャッジ時間 9,393 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 167 ms
57,048 KB
testcase_01 AC 168 ms
56,904 KB
testcase_02 WA -
testcase_03 AC 168 ms
56,780 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 172 ms
57,088 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 167 ms
57,028 KB
testcase_13 AC 168 ms
57,160 KB
testcase_14 AC 169 ms
55,064 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 167 ms
57,176 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 168 ms
57,260 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 166 ms
57,400 KB
testcase_26 AC 168 ms
56,948 KB
testcase_27 AC 167 ms
57,172 KB
testcase_28 AC 170 ms
57,252 KB
testcase_29 AC 166 ms
57,084 KB
testcase_30 AC 166 ms
57,144 KB
testcase_31 AC 167 ms
57,392 KB
testcase_32 AC 163 ms
57,000 KB
testcase_33 AC 166 ms
57,188 KB
testcase_34 AC 166 ms
57,324 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
import java.util.Arrays;
import java.util.Deque;
import java.util.ArrayDeque;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        String c = sc.next();
        c = c.replaceAll("UTC", "");
        double C = Double.parseDouble(c);
        C = C - 9;
        a = (int) (a + C * 100 / 100);
        b = (int) (b + (C * 100 % 100) * 0.6);
        if (b < 0) {
            b = 60 + b;
            a = a - 1;
        }
        if (b >= 60) {
            b = b - 60;
            a = a + 1;

        }
        if (a > 24) {
            a = a - 24;
        }
        if (a < 0) {
            a = a + 24;
        }
        System.out.println(a / 10 + "" + a % 10 + ":" + b / 10 + "" + b % 10 + "");
    }
}
0