結果
問題 | No.278 連続する整数の和(2) |
ユーザー | ayaoni |
提出日時 | 2020-12-05 02:36:43 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 94 ms / 2,000 ms |
コード長 | 742 bytes |
コンパイル時間 | 305 ms |
コンパイル使用メモリ | 87,320 KB |
実行使用メモリ | 76,328 KB |
最終ジャッジ日時 | 2023-10-13 13:20:01 |
合計ジャッジ時間 | 3,036 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 70 ms
72,016 KB |
testcase_01 | AC | 72 ms
71,428 KB |
testcase_02 | AC | 89 ms
75,912 KB |
testcase_03 | AC | 72 ms
71,864 KB |
testcase_04 | AC | 73 ms
71,896 KB |
testcase_05 | AC | 74 ms
75,580 KB |
testcase_06 | AC | 76 ms
75,960 KB |
testcase_07 | AC | 78 ms
76,328 KB |
testcase_08 | AC | 88 ms
75,644 KB |
testcase_09 | AC | 89 ms
75,836 KB |
testcase_10 | AC | 94 ms
75,872 KB |
testcase_11 | AC | 87 ms
75,940 KB |
testcase_12 | AC | 72 ms
71,460 KB |
testcase_13 | AC | 88 ms
75,872 KB |
testcase_14 | AC | 83 ms
75,956 KB |
testcase_15 | AC | 87 ms
75,804 KB |
testcase_16 | AC | 82 ms
75,648 KB |
testcase_17 | AC | 92 ms
75,824 KB |
ソースコード
import sys from math import gcd sys.setrecursionlimit(10**7) def I(): return int(sys.stdin.readline().rstrip()) def MI(): return map(int,sys.stdin.readline().rstrip().split()) def LI(): return list(map(int,sys.stdin.readline().rstrip().split())) def LI2(): return list(map(int,sys.stdin.readline().rstrip())) def S(): return sys.stdin.readline().rstrip() def LS(): return list(sys.stdin.readline().rstrip().split()) def LS2(): return list(sys.stdin.readline().rstrip()) def divisor(n): # nの約数全列挙 res = [] for i in range(1,int(n**.5)+1): if n % i == 0: res.append(i) if i != n//i: res.append(n//i) return res N = I() div = divisor(gcd(N,N*(N+1)//2)) print(sum(div))