結果
| 問題 | 
                            No.888 約数の総和
                             | 
                    
| コンテスト | |
| ユーザー | 
                             liny_tail
                         | 
                    
| 提出日時 | 2021-01-11 19:07:08 | 
| 言語 | Python3  (3.13.1 + numpy 2.2.1 + scipy 1.14.1)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 229 ms / 2,000 ms | 
| コード長 | 332 bytes | 
| コンパイル時間 | 138 ms | 
| コンパイル使用メモリ | 12,672 KB | 
| 実行使用メモリ | 11,008 KB | 
| 最終ジャッジ日時 | 2024-11-21 09:18:26 | 
| 合計ジャッジ時間 | 4,295 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge1 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 30 | 
ソースコード
def divisor(number):
  lower_divisors ,upper_divisors = [], []
  i = 1
  
  while i**2 <= number:
    if number % i == 0:
      lower_divisors.append(i)
      if i != number // i:
        upper_divisors.append(number//i)
    i += 1
  
  return lower_divisors + upper_divisors[::-1]
N = int(input().strip())
print(sum(divisor(N)))
            
            
            
        
            
liny_tail