結果

問題 No.1236 長針と短針
ユーザー persimmon-persimmonpersimmon-persimmon
提出日時 2021-03-03 09:05:18
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 344 bytes
コンパイル時間 212 ms
コンパイル使用メモリ 82,248 KB
実行使用メモリ 61,312 KB
最終ジャッジ日時 2024-04-14 05:51:27
合計ジャッジ時間 2,052 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
52,640 KB
testcase_01 AC 44 ms
58,224 KB
testcase_02 AC 37 ms
52,924 KB
testcase_03 AC 42 ms
58,676 KB
testcase_04 AC 37 ms
52,828 KB
testcase_05 AC 37 ms
52,556 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 38 ms
53,072 KB
testcase_10 AC 37 ms
53,164 KB
testcase_11 AC 42 ms
58,712 KB
testcase_12 AC 37 ms
53,280 KB
testcase_13 AC 41 ms
58,280 KB
testcase_14 AC 37 ms
52,708 KB
testcase_15 AC 37 ms
52,344 KB
testcase_16 WA -
testcase_17 AC 41 ms
58,064 KB
testcase_18 AC 37 ms
52,332 KB
testcase_19 AC 41 ms
58,064 KB
testcase_20 AC 41 ms
58,524 KB
testcase_21 AC 36 ms
53,956 KB
testcase_22 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

a,b=map(int,input().split())
# 5分/60=1/12分
a%=12
a*=5*720
a+=b*(720*5//60)
b*=720
mod=43200
na,nb=a,b
na,nb=na%mod,nb%mod
pre=na>nb
#print((a,b),pre)
for i in range(3600):
  na=a+i
  nb=b+i*(720//60)
  na,nb=na%mod,nb%mod
  if na%mod==nb%mod:
    print(i)
    break
  now=na>nb
  if nb!=0 and pre!=now:
    print(i-1)
    break
  pre=na>nb
0