結果

問題 No.1236 長針と短針
ユーザー tikitaka1201tikitaka1201
提出日時 2020-09-26 18:27:43
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 417 bytes
コンパイル時間 490 ms
コンパイル使用メモリ 87,552 KB
実行使用メモリ 76,948 KB
最終ジャッジ日時 2023-09-11 23:42:10
合計ジャッジ時間 3,237 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 68 ms
71,756 KB
testcase_01 AC 81 ms
76,884 KB
testcase_02 AC 68 ms
71,888 KB
testcase_03 AC 74 ms
76,628 KB
testcase_04 AC 72 ms
71,644 KB
testcase_05 AC 68 ms
71,692 KB
testcase_06 AC 78 ms
76,728 KB
testcase_07 WA -
testcase_08 AC 76 ms
76,608 KB
testcase_09 AC 70 ms
71,944 KB
testcase_10 AC 70 ms
71,912 KB
testcase_11 AC 73 ms
76,544 KB
testcase_12 AC 69 ms
71,844 KB
testcase_13 AC 76 ms
76,948 KB
testcase_14 AC 68 ms
71,736 KB
testcase_15 AC 68 ms
71,772 KB
testcase_16 AC 76 ms
76,896 KB
testcase_17 AC 75 ms
76,476 KB
testcase_18 AC 70 ms
71,448 KB
testcase_19 AC 74 ms
76,628 KB
testcase_20 AC 74 ms
76,584 KB
testcase_21 AC 69 ms
71,956 KB
testcase_22 AC 76 ms
76,772 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline
def MI():
    return map(int, input().split())
import math
a,b=MI()
if a==12: a=0

for sec in range(1, 3600*12):
    angle_a=2*math.pi*(a+b/60+sec/3600)/12
    angle_b=2*math.pi*(b+sec/60)/60
    #print(angle_a,angle_b)
    if angle_a>2*math.pi:angle_a-=2*math.pi
    if angle_b>2*math.pi:angle_b-=2*math.pi
    if 0<angle_b-angle_a<5*10**(-3):
        print(sec-1)
        break
0