結果

問題 No.1236 長針と短針
ユーザー 👑 SPD_9X2SPD_9X2
提出日時 2020-09-25 21:33:48
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 79 ms / 2,000 ms
コード長 391 bytes
コンパイル時間 469 ms
コンパイル使用メモリ 87,048 KB
実行使用メモリ 75,636 KB
最終ジャッジ日時 2023-09-10 14:58:59
合計ジャッジ時間 3,396 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,124 KB
testcase_01 AC 77 ms
75,484 KB
testcase_02 AC 73 ms
71,028 KB
testcase_03 AC 79 ms
75,532 KB
testcase_04 AC 74 ms
71,212 KB
testcase_05 AC 73 ms
71,152 KB
testcase_06 AC 77 ms
75,624 KB
testcase_07 AC 76 ms
75,512 KB
testcase_08 AC 77 ms
75,504 KB
testcase_09 AC 74 ms
71,452 KB
testcase_10 AC 74 ms
71,300 KB
testcase_11 AC 77 ms
75,636 KB
testcase_12 AC 74 ms
71,400 KB
testcase_13 AC 78 ms
75,580 KB
testcase_14 AC 75 ms
71,372 KB
testcase_15 AC 76 ms
71,148 KB
testcase_16 AC 78 ms
75,536 KB
testcase_17 AC 76 ms
75,500 KB
testcase_18 AC 74 ms
71,380 KB
testcase_19 AC 76 ms
75,496 KB
testcase_20 AC 77 ms
75,524 KB
testcase_21 AC 74 ms
71,216 KB
testcase_22 AC 76 ms
75,364 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

"""

12時間で1周→12*3600度で1周とする 1秒で1度
3600秒で1周→1秒で12度

"""

A,B = map(int,input().split())
lp = 12*3600

C = 0

X = ( A*3600+B*60+C ) % lp
Y = ( (B*60+C) * 12 ) % lp
#print (X,Y)
if Y > X:
    X += lp

for i in range(3600*24*10):

    if Y == X:
        print (i)
        break
    elif Y > X:
        print (i-1)
        break

    X += 1
    Y += 12
0