Submission #49206915


Source Code Expand

n = int(input())
for x in range(n + 1):
    for y in range(n + 1):
        for z in range(n + 1):
            if x + y + z <= n:
                print(f"{x} {y} {z}")

Submission Info

Submission Time
Task B - Tetrahedral Number
User shinever
Language Python (PyPy 3.10-v7.3.12)
Score 150
Code Size 171 Byte
Status AC
Exec Time 69 ms
Memory 82120 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 150 / 150
Status
AC × 2
AC × 22
Set Name Test Cases
Sample sample_01.txt, sample_02.txt
All random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, random_10.txt, random_11.txt, random_12.txt, random_13.txt, random_14.txt, random_15.txt, random_16.txt, random_17.txt, random_18.txt, random_19.txt, random_20.txt, random_21.txt, random_22.txt, sample_01.txt, sample_02.txt
Case Name Status Exec Time Memory
random_03.txt AC 57 ms 76376 KiB
random_04.txt AC 57 ms 76508 KiB
random_05.txt AC 59 ms 76508 KiB
random_06.txt AC 57 ms 76540 KiB
random_07.txt AC 56 ms 76316 KiB
random_08.txt AC 57 ms 76372 KiB
random_09.txt AC 58 ms 76604 KiB
random_10.txt AC 57 ms 76316 KiB
random_11.txt AC 61 ms 80636 KiB
random_12.txt AC 62 ms 80736 KiB
random_13.txt AC 64 ms 81964 KiB
random_14.txt AC 66 ms 81684 KiB
random_15.txt AC 63 ms 80708 KiB
random_16.txt AC 66 ms 82052 KiB
random_17.txt AC 65 ms 81656 KiB
random_18.txt AC 64 ms 82088 KiB
random_19.txt AC 69 ms 82112 KiB
random_20.txt AC 66 ms 81904 KiB
random_21.txt AC 66 ms 81812 KiB
random_22.txt AC 67 ms 82120 KiB
sample_01.txt AC 58 ms 76308 KiB
sample_02.txt AC 58 ms 76604 KiB