Submission #12750974


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

X = int(read())

x = np.arange(-300, 300, dtype=np.int64)

x5 = x**5
diff = np.subtract.outer(x5, x5)

i = np.where(diff == X)

x, y = i[0][0], i[1][0]
x -= 300
y -= 300

assert x**5 - y**5 == X
print(x, y)

Submission Info

Submission Time
Task D - I hate Factorization
User maspy
Language Python (3.8.2)
Score 400
Code Size 364 Byte
Status
Exec Time 108 ms
Memory 30208 KB

Test Cases

Set Name Score / Max Score Test Cases
Sample 0 / 0 Sample_01.txt, Sample_02.txt
All 400 / 400 Sample_01.txt, Sample_02.txt, bmin_01.txt, rand_01.txt, rand_02.txt, rand_03.txt, rand_04.txt, rand_05.txt, small_01.txt, small_02.txt, small_03.txt, small_04.txt, small_05.txt
Case Name Status Exec Time Memory
Sample_01.txt 105 ms 29840 KB
Sample_02.txt 107 ms 29920 KB
bmin_01.txt 104 ms 30008 KB
rand_01.txt 106 ms 30116 KB
rand_02.txt 105 ms 30004 KB
rand_03.txt 103 ms 30012 KB
rand_04.txt 106 ms 29992 KB
rand_05.txt 103 ms 29724 KB
small_01.txt 107 ms 30208 KB
small_02.txt 108 ms 29864 KB
small_03.txt 102 ms 30004 KB
small_04.txt 103 ms 29924 KB
small_05.txt 105 ms 29856 KB