結果

問題 No.652 E869120 and TimeZone
ユーザー 6soukiti296soukiti29
提出日時 2018-02-23 22:58:20
言語 Nim
(2.0.2)
結果
WA  
実行時間 -
コード長 406 bytes
コンパイル時間 3,322 ms
コンパイル使用メモリ 71,284 KB
実行使用メモリ 4,388 KB
最終ジャッジ日時 2023-09-12 16:38:46
合計ジャッジ時間 4,793 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 2 ms
4,380 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 2 ms
4,380 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 1 ms
4,384 KB
testcase_13 WA -
testcase_14 AC 2 ms
4,384 KB
testcase_15 AC 2 ms
4,380 KB
testcase_16 AC 2 ms
4,380 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 2 ms
4,384 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 2 ms
4,380 KB
testcase_23 AC 1 ms
4,384 KB
testcase_24 WA -
testcase_25 AC 2 ms
4,384 KB
testcase_26 AC 2 ms
4,380 KB
testcase_27 WA -
testcase_28 AC 2 ms
4,384 KB
testcase_29 AC 2 ms
4,380 KB
testcase_30 AC 1 ms
4,380 KB
testcase_31 AC 2 ms
4,380 KB
testcase_32 AC 1 ms
4,384 KB
testcase_33 AC 1 ms
4,380 KB
testcase_34 AC 2 ms
4,384 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sequtils,strutils,strscans,math
var
    t : float
    s = stdin.readline.split
    h,m : int
(h, m) = s[0..1].map(parseInt)
if scanf(s[2],"UTC+$f",t):
    discard
elif scanf(s[2],"UTC-$f",t):
    t = -1 * t

h += t.int - 9
if h < 0:
    h += 24
elif h >= 24:
    h -= 24
m += ((t mod 1) * 60).int
var
    H = $h
    M = $m
if H.len == 1:
    H = "0" & H
if M.len == 1:
    M = "0" & M
echo H, ":", M
0