結果

問題 No.1236 長針と短針
ユーザー 👑 H20H20
提出日時 2022-02-16 10:17:39
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 82 ms / 2,000 ms
コード長 259 bytes
コンパイル時間 323 ms
コンパイル使用メモリ 86,800 KB
実行使用メモリ 75,876 KB
最終ジャッジ日時 2023-09-11 17:08:00
合計ジャッジ時間 4,001 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,168 KB
testcase_01 AC 82 ms
75,776 KB
testcase_02 AC 71 ms
71,252 KB
testcase_03 AC 77 ms
75,616 KB
testcase_04 AC 73 ms
71,304 KB
testcase_05 AC 70 ms
71,164 KB
testcase_06 AC 77 ms
75,780 KB
testcase_07 AC 76 ms
75,720 KB
testcase_08 AC 76 ms
75,708 KB
testcase_09 AC 73 ms
71,368 KB
testcase_10 AC 71 ms
71,124 KB
testcase_11 AC 77 ms
75,676 KB
testcase_12 AC 74 ms
71,156 KB
testcase_13 AC 80 ms
75,680 KB
testcase_14 AC 74 ms
70,968 KB
testcase_15 AC 72 ms
71,232 KB
testcase_16 AC 77 ms
75,672 KB
testcase_17 AC 78 ms
75,716 KB
testcase_18 AC 73 ms
71,308 KB
testcase_19 AC 77 ms
75,772 KB
testcase_20 AC 76 ms
75,580 KB
testcase_21 AC 71 ms
71,124 KB
testcase_22 AC 75 ms
75,876 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

A,B = map(int, input().split())
A=A%12
s=0
while  (A*3600+B*60+s)%43200!=(B*720+s*12)%43200: 
    if ((A*3600+B*60+s)%43200-(B*720+s*12)%43200)*((A*3600+B*60+(s+1))%43200-(B*720+(s+1)*12)%43200)<0 and (B*720+(s+1)*12)%43200!=0:
        break
    s+=1
print(s)
0