Submission #14766229


Source Code Expand

Copy
import sys
import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

def main(N):
    div = np.zeros(N+1, np.int64)
    for n in range(1, N+1):
      for m in range(n, N+1, n):
        div[m] += m
    return div.sum()

if sys.argv[-1] == 'ONLINE_JUDGE':
    import numba
    from numba.pycc import CC
    i8 = numba.int64
    cc = CC('my_module')

    def cc_export(f, signature):
        cc.export(f.__name__, signature)(f)
        return numba.njit(f)

    main = cc_export(main, (i8, ))
    cc.compile()

from my_module import main

N = int(read())
print(main(N))

Submission Info

Submission Time
Task D - Sum of Divisors
User maspy
Language Python (3.8.2)
Score 400
Code Size 666 Byte
Status
Exec Time 1604 ms
Memory 105124 KB

Judge Result

Set Name Score / Max Score Test Cases
Sample 0 / 0 sample_01.txt, sample_02.txt, sample_03.txt
All 400 / 400 hand_01.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, random_10.txt, sample_01.txt, sample_02.txt, sample_03.txt, sq_01.txt, sq_02.txt, sq_03.txt, sq_04.txt, sq_05.txt, sq_06.txt
Case Name Status Exec Time Memory
hand_01.txt 122 ms 26784 KB
random_01.txt 1551 ms 104892 KB
random_02.txt 1224 ms 88748 KB
random_03.txt 1575 ms 105124 KB
random_04.txt 725 ms 65644 KB
random_05.txt 1553 ms 104976 KB
random_06.txt 496 ms 55816 KB
random_07.txt 1534 ms 105020 KB
random_08.txt 922 ms 75376 KB
random_09.txt 1598 ms 104712 KB
random_10.txt 175 ms 35152 KB
sample_01.txt 124 ms 27372 KB
sample_02.txt 122 ms 27332 KB
sample_03.txt 1574 ms 104836 KB
sq_01.txt 1517 ms 104716 KB
sq_02.txt 1574 ms 105036 KB
sq_03.txt 1574 ms 104960 KB
sq_04.txt 1568 ms 104916 KB
sq_05.txt 1531 ms 104696 KB
sq_06.txt 1604 ms 104572 KB