結果

問題 No.2016 Countdown Divisors
ユーザー nohakai3nohakai3
提出日時 2022-07-24 20:40:37
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 469 bytes
コンパイル時間 72 ms
コンパイル使用メモリ 10,796 KB
実行使用メモリ 12,592 KB
最終ジャッジ日時 2023-09-20 21:00:48
合計ジャッジ時間 3,762 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
12,212 KB
testcase_01 TLE -
testcase_02 -- -
testcase_03 -- -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]

def f(x):
    while x>=3:
        x=x-len(make_divisors(x))
    return x
n=int(input())
l=[]
for i in range(n):
    m=int(input())
    l.append(f(m))

for x in l:
    print(x)
0