結果
| 問題 |
No.2480 Sequence Sum
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-04-14 19:40:29 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 42 ms / 500 ms |
| コード長 | 290 bytes |
| コンパイル時間 | 338 ms |
| コンパイル使用メモリ | 82,176 KB |
| 実行使用メモリ | 57,728 KB |
| 最終ジャッジ日時 | 2024-10-03 21:41:12 |
| 合計ジャッジ時間 | 1,727 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 13 |
ソースコード
from math import isqrt
def divisors(n):
r = isqrt(n - 1) + 1
small, large = [], []
for i in range(1, r):
if n % i == 0:
small.append(i)
large.append(n//i)
if r**2 == n: small.append(r)
return small + large[::-1]
N = int(input())
D = divisors(N)
print(N - len(D))