結果

問題 No.1236 長針と短針
ユーザー tikitaka1201tikitaka1201
提出日時 2020-09-26 18:57:09
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 76 ms / 2,000 ms
コード長 423 bytes
コンパイル時間 850 ms
コンパイル使用メモリ 87,240 KB
実行使用メモリ 76,176 KB
最終ジャッジ日時 2023-09-12 00:18:33
合計ジャッジ時間 3,160 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,184 KB
testcase_01 AC 74 ms
75,864 KB
testcase_02 AC 69 ms
71,488 KB
testcase_03 AC 73 ms
76,176 KB
testcase_04 AC 68 ms
71,128 KB
testcase_05 AC 69 ms
71,340 KB
testcase_06 AC 75 ms
76,168 KB
testcase_07 AC 73 ms
76,052 KB
testcase_08 AC 74 ms
76,068 KB
testcase_09 AC 70 ms
71,300 KB
testcase_10 AC 69 ms
71,272 KB
testcase_11 AC 74 ms
75,852 KB
testcase_12 AC 69 ms
71,136 KB
testcase_13 AC 72 ms
75,888 KB
testcase_14 AC 69 ms
71,704 KB
testcase_15 AC 68 ms
71,120 KB
testcase_16 AC 76 ms
75,996 KB
testcase_17 AC 72 ms
76,140 KB
testcase_18 AC 72 ms
71,292 KB
testcase_19 AC 71 ms
75,964 KB
testcase_20 AC 72 ms
76,036 KB
testcase_21 AC 68 ms
71,264 KB
testcase_22 AC 73 ms
76,052 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline
def MI():
    return map(int, input().split())
import math
a,b=MI()
a%=12
for sec in range(3600*2):
    newb=b+sec//60
    newa=a+0
    if 60<=newb<120:
        newa+=1
    elif newb>=120:
        newa+=2
    newa%=12
    newb%=60
    nsec=sec%60
    #print(newa,newb,sec)
    #print(11*sec+660*newb-3600*newa)
    if -11<11*nsec+660*newb-3600*newa<=0:
        print(sec)
        break
0