結果

問題 No.1737 One to N
ユーザー U SU S
提出日時 2021-11-12 23:54:00
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 116 ms / 2,000 ms
コード長 948 bytes
コンパイル時間 399 ms
コンパイル使用メモリ 87,160 KB
実行使用メモリ 74,668 KB
最終ジャッジ日時 2023-08-17 04:57:29
合計ジャッジ時間 5,275 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 113 ms
74,280 KB
testcase_01 AC 116 ms
74,276 KB
testcase_02 AC 110 ms
74,260 KB
testcase_03 AC 110 ms
74,340 KB
testcase_04 AC 107 ms
74,216 KB
testcase_05 AC 111 ms
74,284 KB
testcase_06 AC 108 ms
74,220 KB
testcase_07 AC 109 ms
74,092 KB
testcase_08 AC 112 ms
74,668 KB
testcase_09 AC 110 ms
74,276 KB
testcase_10 AC 110 ms
74,376 KB
testcase_11 AC 109 ms
74,296 KB
testcase_12 AC 110 ms
74,396 KB
testcase_13 AC 113 ms
74,196 KB
testcase_14 AC 109 ms
74,404 KB
testcase_15 AC 109 ms
74,436 KB
testcase_16 AC 108 ms
74,128 KB
testcase_17 AC 107 ms
74,656 KB
testcase_18 AC 107 ms
74,216 KB
testcase_19 AC 106 ms
74,232 KB
testcase_20 AC 106 ms
74,212 KB
testcase_21 AC 105 ms
74,340 KB
testcase_22 AC 114 ms
74,404 KB
testcase_23 AC 108 ms
74,280 KB
testcase_24 AC 109 ms
74,140 KB
testcase_25 AC 108 ms
74,388 KB
testcase_26 AC 109 ms
74,376 KB
testcase_27 AC 110 ms
74,456 KB
testcase_28 AC 109 ms
74,288 KB
testcase_29 AC 110 ms
73,816 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# import sys
# input = sys.stdin.readline
def mp():return map(int,input().split())
def lmp():return list(map(int,input().split()))
def mps(A):return [tuple(map(int, input().split())) for _ in range(A)]
import math
import bisect
import heapq
from copy import deepcopy as dc
from itertools import accumulate
from collections import Counter, defaultdict, deque
def ceil(U,V):return (U+V-1)//V
def modf1(N,MOD):return (N-1)%MOD+1
inf = int(1e20)
mod = int(1e9+7)
import time
import copy

def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])
    if temp!=1:
        arr.append([temp, 1])
    if arr==[]:
        arr.append([n, 1])
    return arr

n = int(input())
u = factorization(n)
ans = 0
if n == 1:print(0)
else:
    for i,j in u:ans += i*j
    print(ans)
0