結果

問題 No.2221 Set X
ユーザー とりゐとりゐ
提出日時 2023-02-17 23:37:49
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 463 ms / 2,000 ms
コード長 339 bytes
コンパイル時間 270 ms
コンパイル使用メモリ 86,924 KB
実行使用メモリ 91,960 KB
最終ジャッジ日時 2023-09-26 20:59:30
合計ジャッジ時間 12,823 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,216 KB
testcase_01 AC 66 ms
71,140 KB
testcase_02 AC 66 ms
71,332 KB
testcase_03 AC 67 ms
71,220 KB
testcase_04 AC 68 ms
71,276 KB
testcase_05 AC 70 ms
71,292 KB
testcase_06 AC 67 ms
71,324 KB
testcase_07 AC 69 ms
71,220 KB
testcase_08 AC 84 ms
76,144 KB
testcase_09 AC 71 ms
75,288 KB
testcase_10 AC 84 ms
76,368 KB
testcase_11 AC 78 ms
76,304 KB
testcase_12 AC 81 ms
76,480 KB
testcase_13 AC 82 ms
76,376 KB
testcase_14 AC 84 ms
76,476 KB
testcase_15 AC 81 ms
76,360 KB
testcase_16 AC 245 ms
80,512 KB
testcase_17 AC 143 ms
77,512 KB
testcase_18 AC 269 ms
81,160 KB
testcase_19 AC 135 ms
77,608 KB
testcase_20 AC 186 ms
78,624 KB
testcase_21 AC 282 ms
82,892 KB
testcase_22 AC 377 ms
86,640 KB
testcase_23 AC 111 ms
77,584 KB
testcase_24 AC 322 ms
82,960 KB
testcase_25 AC 191 ms
80,420 KB
testcase_26 AC 425 ms
90,644 KB
testcase_27 AC 456 ms
91,960 KB
testcase_28 AC 459 ms
91,892 KB
testcase_29 AC 388 ms
91,636 KB
testcase_30 AC 406 ms
91,608 KB
testcase_31 AC 444 ms
91,924 KB
testcase_32 AC 374 ms
91,696 KB
testcase_33 AC 412 ms
91,908 KB
testcase_34 AC 405 ms
91,804 KB
testcase_35 AC 393 ms
91,672 KB
testcase_36 AC 420 ms
91,912 KB
testcase_37 AC 434 ms
91,888 KB
testcase_38 AC 424 ms
91,796 KB
testcase_39 AC 442 ms
89,092 KB
testcase_40 AC 463 ms
90,012 KB
testcase_41 AC 453 ms
91,796 KB
testcase_42 AC 451 ms
91,824 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from sys import stdin
input=lambda :stdin.readline()[:-1]

n=int(input())
a=list(map(int,input().split()))

ans=10**9
ans2=-1

import bisect

for x in range(1,2*n+1):
  now=0
  i=0
  while i!=n:
    now+=x+1
    if now>=ans:
      break
    i=bisect.bisect_left(a,(a[i]//x+1)*x)
  if now<ans:
    ans=now
    ans2=x

print(ans2)
print(ans)
0