結果

問題 No.1236 長針と短針
ユーザー aqua_tenhouaqua_tenhou
提出日時 2020-09-25 21:38:34
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 561 bytes
コンパイル時間 332 ms
コンパイル使用メモリ 10,952 KB
実行使用メモリ 8,012 KB
最終ジャッジ日時 2023-09-10 15:02:28
合計ジャッジ時間 1,619 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,768 KB
testcase_01 AC 17 ms
7,808 KB
testcase_02 AC 16 ms
7,776 KB
testcase_03 AC 17 ms
7,784 KB
testcase_04 WA -
testcase_05 AC 15 ms
7,852 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 18 ms
7,876 KB
testcase_09 AC 16 ms
7,936 KB
testcase_10 WA -
testcase_11 AC 17 ms
7,776 KB
testcase_12 WA -
testcase_13 AC 17 ms
7,780 KB
testcase_14 AC 16 ms
7,784 KB
testcase_15 AC 15 ms
7,812 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 16 ms
7,784 KB
testcase_19 AC 17 ms
7,840 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 17 ms
7,808 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

a,b = map(int,input().split())
s1 = a*3600 + 60*b
s2 = 60 * b
s_max1 = 12 * 3600
s_max2 = 3600

dig1 = s1/s_max1 * 360
if abs(dig1-360) < 0.01:
    dig1 = 0

dig2 = s2/s_max2 * 360
if abs(dig2-360) < 0.01:
    dig2 = 0

if dig2 > dig1:
    dig1 += 360

if dig2 >= dig1:
    ans = 0
else:
    for i in range(24*3600):

        s1 += 1
        s2 += 1    
        dig1 = s1/s_max1 * 360
        dig2 = s2/s_max2 * 360

        if dig2 == dig1:
            ans = i+1
            break
        elif dig2 > dig1:
            ans = i
            break
    
print(ans)
0