結果
| 問題 |
No.2016 Countdown Divisors
|
| コンテスト | |
| ユーザー |
nohakai3
|
| 提出日時 | 2022-07-24 20:40:37 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 469 bytes |
| コンパイル時間 | 74 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 17,700 KB |
| 最終ジャッジ日時 | 2024-07-06 15:48:24 |
| 合計ジャッジ時間 | 3,783 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 1 |
| other | AC * 1 TLE * 1 -- * 17 |
ソースコード
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)
nohakai3