結果

問題 No.1730 GCD on Blackboard in yukicoder
ユーザー るさるさ
提出日時 2021-08-17 19:09:17
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 643 ms / 2,000 ms
コード長 159 bytes
コンパイル時間 289 ms
コンパイル使用メモリ 82,456 KB
実行使用メモリ 210,816 KB
最終ジャッジ日時 2024-04-25 17:11:33
合計ジャッジ時間 17,917 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 623 ms
204,660 KB
testcase_01 AC 557 ms
195,992 KB
testcase_02 AC 558 ms
195,660 KB
testcase_03 AC 558 ms
196,248 KB
testcase_04 AC 561 ms
196,344 KB
testcase_05 AC 560 ms
196,180 KB
testcase_06 AC 573 ms
195,720 KB
testcase_07 AC 558 ms
195,936 KB
testcase_08 AC 569 ms
195,792 KB
testcase_09 AC 558 ms
195,936 KB
testcase_10 AC 582 ms
195,900 KB
testcase_11 AC 557 ms
196,060 KB
testcase_12 AC 545 ms
195,792 KB
testcase_13 AC 615 ms
204,100 KB
testcase_14 AC 611 ms
204,340 KB
testcase_15 AC 621 ms
204,396 KB
testcase_16 AC 643 ms
204,460 KB
testcase_17 AC 634 ms
204,020 KB
testcase_18 AC 617 ms
204,616 KB
testcase_19 AC 628 ms
204,464 KB
testcase_20 AC 605 ms
204,672 KB
testcase_21 AC 605 ms
204,744 KB
testcase_22 AC 638 ms
204,252 KB
testcase_23 AC 595 ms
210,816 KB
testcase_24 AC 595 ms
210,632 KB
testcase_25 AC 606 ms
204,260 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