結果
| 問題 | No.1236 長針と短針 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-10-07 23:50:35 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 36 ms / 2,000 ms |
| コード長 | 760 bytes |
| コンパイル時間 | 285 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,752 KB |
| 最終ジャッジ日時 | 2024-07-20 04:34:03 |
| 合計ジャッジ時間 | 1,956 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 |
ソースコード
import math
A, B = map(int, input().split())
if A == 24:
angA = 0
elif A >= 12:
angA = A - 12
else:
angA = A
ans = 0
nowB = B * 6
nowA = angA * 30 + B * 0.5
if nowB > nowA:
ans += (60 - B)* 60
nowB = 0
angA += 1
if angA == 12:
angA = 0
nowA = angA * 30
if math.isclose(((nowA - nowB) / (0.1 - (0.5/60))), int(((nowA - nowB) / (0.1 - (0.5/60)))) + 1):
ans += int((nowA - nowB) / (0.1 - (0.5/60))) + 1
else:
ans += int((nowA - nowB) / (0.1 - (0.5/60)))
print(ans)
else:
if math.isclose(((nowA - nowB) / (0.1 - (0.5/60))), int(((nowA - nowB) / (0.1 - (0.5/60)))) + 1):
print(int((nowA - nowB) / (0.1 - (0.5/60))) + 1)
else:
print(int((nowA - nowB) / (0.1 - (0.5/60))))