結果

問題 No.1236 長針と短針
ユーザー persimmon-persimmonpersimmon-persimmon
提出日時 2021-03-03 08:57:45
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 308 bytes
コンパイル時間 168 ms
コンパイル使用メモリ 82,488 KB
実行使用メモリ 59,408 KB
最終ジャッジ日時 2024-04-14 05:51:11
合計ジャッジ時間 2,077 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
52,688 KB
testcase_01 AC 41 ms
59,212 KB
testcase_02 AC 37 ms
53,812 KB
testcase_03 AC 40 ms
58,784 KB
testcase_04 WA -
testcase_05 AC 38 ms
53,224 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 37 ms
53,144 KB
testcase_10 WA -
testcase_11 AC 41 ms
58,256 KB
testcase_12 WA -
testcase_13 AC 42 ms
58,184 KB
testcase_14 AC 38 ms
52,920 KB
testcase_15 AC 38 ms
52,580 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 38 ms
52,432 KB
testcase_19 AC 40 ms
59,040 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

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