結果

問題 No.1730 GCD on Blackboard in yukicoder
ユーザー るさるさ
提出日時 2021-08-17 19:09:17
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 698 ms / 2,000 ms
コード長 159 bytes
コンパイル時間 274 ms
コンパイル使用メモリ 86,964 KB
実行使用メモリ 212,300 KB
最終ジャッジ日時 2023-08-07 22:54:07
合計ジャッジ時間 19,589 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 688 ms
205,344 KB
testcase_01 AC 649 ms
196,948 KB
testcase_02 AC 631 ms
197,056 KB
testcase_03 AC 590 ms
196,940 KB
testcase_04 AC 597 ms
196,808 KB
testcase_05 AC 622 ms
196,976 KB
testcase_06 AC 619 ms
196,852 KB
testcase_07 AC 576 ms
196,892 KB
testcase_08 AC 593 ms
196,840 KB
testcase_09 AC 564 ms
196,948 KB
testcase_10 AC 579 ms
196,732 KB
testcase_11 AC 595 ms
196,908 KB
testcase_12 AC 579 ms
196,904 KB
testcase_13 AC 627 ms
205,576 KB
testcase_14 AC 635 ms
205,472 KB
testcase_15 AC 682 ms
205,356 KB
testcase_16 AC 690 ms
205,496 KB
testcase_17 AC 685 ms
205,204 KB
testcase_18 AC 676 ms
205,572 KB
testcase_19 AC 694 ms
205,496 KB
testcase_20 AC 698 ms
205,560 KB
testcase_21 AC 689 ms
205,580 KB
testcase_22 AC 673 ms
205,272 KB
testcase_23 AC 649 ms
212,300 KB
testcase_24 AC 673 ms
205,536 KB
testcase_25 AC 670 ms
205,276 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
b=8**7
c=[0]*b
for i in input().split():c[int(i)]+=1
d=[0]*b
for i in range(1,b):d[n-sum(c[i::i])]=i
m=0
for i in range(n):print(m:=max(m,d[i]))
0