Submission #15157664


Source Code Expand

Copy
import sys
import numpy as np
import numba
from numba import njit
i8 = numba.int64

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

N = int(read())

@njit((), cache=True)
def compute():
    f = np.zeros(10_001, np.int64)
    for x in range(1, 101):
        for y in range(1, 101):
            for z in range(1, 101):
                n = x * x + y * y + z * z + x * y + x * z + y * z
                if n > 10000:
                    continue
                f[n] += 1
    return f

f = compute()

for n in range(1, N + 1):
    print(f[n])

Submission Info

Submission Time
Task C - XYZ Triplets
User maspy
Language Python (3.8.2)
Score 300
Code Size 623 Byte
Status
Exec Time 679 ms
Memory 110260 KB

Judge Result

Set Name Score / Max Score Test Cases
Sample 0 / 0 sample_01.txt
All 300 / 300 hand_01.txt, hand_02.txt, sample_01.txt
Case Name Status Exec Time Memory
hand_01.txt 679 ms 109952 KB
hand_02.txt 648 ms 110260 KB
sample_01.txt 659 ms 109880 KB