結果
| 問題 |
No.652 E869120 and TimeZone
|
| コンテスト | |
| ユーザー |
damin
|
| 提出日時 | 2020-11-04 04:14:34 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,234 bytes |
| コンパイル時間 | 124 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 11,648 KB |
| 最終ジャッジ日時 | 2024-07-22 09:39:08 |
| 合計ジャッジ時間 | 2,816 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 5 |
| other | AC * 21 WA * 9 |
ソースコード
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 = 10-int(s[-1])
# print(hun)
b+= hun *6
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)
damin