結果
| 問題 | No.2480 Sequence Sum |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-04-14 19:40:29 |
| 言語 | PyPy3 (7.3.23 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 27 ms / 500 ms |
| + 189µs | |
| コード長 | 290 bytes |
| 記録 | |
| コンパイル時間 | 72 ms |
| コンパイル使用メモリ | 80,512 KB |
| 実行使用メモリ | 60,544 KB |
| 最終ジャッジ日時 | 2026-09-09 21:00:48 |
| 合計ジャッジ時間 | 1,974 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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))