結果
| 問題 |
No.888 約数の総和
|
| コンテスト | |
| ユーザー |
ohana
|
| 提出日時 | 2023-10-30 10:13:04 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 58 ms / 2,000 ms |
| コード長 | 338 bytes |
| コンパイル時間 | 367 ms |
| コンパイル使用メモリ | 82,408 KB |
| 実行使用メモリ | 58,880 KB |
| 最終ジャッジ日時 | 2024-09-25 17:10:55 |
| 合計ジャッジ時間 | 3,009 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 30 |
ソースコード
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]
print(sum(make_divisors(int(input()))))
ohana