結果
| 問題 |
No.1236 長針と短針
|
| コンテスト | |
| ユーザー |
lam6er
|
| 提出日時 | 2025-03-26 15:46:30 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 38 ms / 2,000 ms |
| コード長 | 537 bytes |
| コンパイル時間 | 138 ms |
| コンパイル使用メモリ | 82,168 KB |
| 実行使用メモリ | 54,116 KB |
| 最終ジャッジ日時 | 2025-03-26 15:47:01 |
| 合計ジャッジ時間 | 1,908 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 |
ソースコード
A, B = map(int, input().split())
# Calculate the angles of the hour and minute hands
hour_angle = A * 30 + B * 0.5
minute_angle = B * 6
# Compute the difference modulo 360
diff = (hour_angle - minute_angle) % 360
# Check if the difference is effectively zero considering floating-point precision
epsilon = 1e-10
if diff < epsilon or (360 - diff) < epsilon:
print(0)
else:
# Convert the difference to seconds
x = int(diff * 2) # diff is a multiple of 0.5, so x is an integer
seconds = (x * 60) // 11
print(seconds)
lam6er