結果

問題 No.652 E869120 and TimeZone
ユーザー damindamin
提出日時 2020-11-04 04:16:53
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 31 ms / 1,000 ms
コード長 1,250 bytes
コンパイル時間 701 ms
コンパイル使用メモリ 10,760 KB
実行使用メモリ 10,000 KB
最終ジャッジ日時 2023-09-02 05:37:03
合計ジャッジ時間 3,082 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
9,956 KB
testcase_01 AC 30 ms
9,840 KB
testcase_02 AC 29 ms
9,840 KB
testcase_03 AC 30 ms
9,920 KB
testcase_04 AC 29 ms
9,848 KB
testcase_05 AC 29 ms
9,984 KB
testcase_06 AC 29 ms
9,920 KB
testcase_07 AC 30 ms
9,912 KB
testcase_08 AC 30 ms
9,760 KB
testcase_09 AC 29 ms
9,740 KB
testcase_10 AC 29 ms
9,840 KB
testcase_11 AC 29 ms
9,968 KB
testcase_12 AC 29 ms
9,760 KB
testcase_13 AC 29 ms
9,956 KB
testcase_14 AC 30 ms
9,880 KB
testcase_15 AC 31 ms
10,000 KB
testcase_16 AC 30 ms
9,916 KB
testcase_17 AC 30 ms
9,924 KB
testcase_18 AC 30 ms
9,756 KB
testcase_19 AC 31 ms
9,932 KB
testcase_20 AC 30 ms
9,768 KB
testcase_21 AC 30 ms
9,840 KB
testcase_22 AC 30 ms
9,744 KB
testcase_23 AC 30 ms
9,904 KB
testcase_24 AC 30 ms
9,964 KB
testcase_25 AC 30 ms
9,768 KB
testcase_26 AC 31 ms
9,988 KB
testcase_27 AC 31 ms
9,772 KB
testcase_28 AC 31 ms
9,764 KB
testcase_29 AC 31 ms
9,900 KB
testcase_30 AC 31 ms
9,780 KB
testcase_31 AC 30 ms
9,744 KB
testcase_32 AC 31 ms
9,904 KB
testcase_33 AC 30 ms
9,744 KB
testcase_34 AC 30 ms
9,884 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
try:
    import os
    f = open('input.txt', 'r')
    sys.stdin = f
except FileNotFoundError:
    None
from math import sqrt, ceil,floor
from collections import deque, Counter, defaultdict
# defaultdict(int)
input=lambda: sys.stdin.readline().strip()
sys.setrecursionlimit(11451419)
from decimal import ROUND_HALF_UP,Decimal  #変換後の末尾桁を0や0.01で指定
  #Decimal((str(0.5)).quantize(Decimal('0'), rounding=ROUND_HALF_UP))
from functools import lru_cache
from bisect import bisect_left as bileft, bisect_right as biright
from fractions import Fraction as frac  #frac(a,b)で正確なa/b
# @lru_cache(maxsize=10**10)
#######ここまでテンプレ#######
#ソート、"a"+"b"、再帰ならPython3の方がいい
#######ここから天ぷら########

a,b,s = map(str ,input().split())
a=int(a);b=int(b)
sa = Decimal(s[3:])-Decimal("9")

# print(int(sa))

# print(sa)
if sa<0:
    if abs(sa%1) <0.01:
        a+= int(sa)
    else:
        a+= floor(sa)
        hun = 1-abs(sa)%1
        # print(hun)
        b+= hun *60
        b=int(b)
else:
    a+=int(sa)
    b += (sa%1)*60
    b=int(b)

if b>=60:
    b-=60
    a+=1
a%=24

ji = "0"+str(a) if 0<=a<=9 else str(a)
hun = "0"+str(b) if 0<=b<=9 else str(b)
print(ji+":"+hun)
0