結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
53,344 KB
testcase_01 WA -
testcase_02 AC 36 ms
52,928 KB
testcase_03 AC 40 ms
58,104 KB
testcase_04 AC 37 ms
52,808 KB
testcase_05 AC 38 ms
53,212 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 37 ms
52,620 KB
testcase_10 AC 39 ms
53,796 KB
testcase_11 AC 41 ms
58,048 KB
testcase_12 AC 37 ms
52,948 KB
testcase_13 WA -
testcase_14 AC 37 ms
52,132 KB
testcase_15 AC 37 ms
52,520 KB
testcase_16 WA -
testcase_17 AC 41 ms
59,404 KB
testcase_18 AC 37 ms
52,488 KB
testcase_19 AC 41 ms
58,676 KB
testcase_20 AC 41 ms
59,816 KB
testcase_21 AC 37 ms
52,280 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=a%mod,b%mod
pre=na>nb
#print((a,b),pre)
for i in range(3600):
  na=a+i
  nb=b+i*(720//60)
  if na%mod==nb%mod:
    print(i)
    break
  now=na>nb
  if pre!=now:
    print(i-1)
    break
0