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 AC
Exec Time 108 ms
Memory 30208 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 400 / 400
Status
AC × 2
AC × 13
Set Name Test Cases
Sample Sample_01.txt, Sample_02.txt
All 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 AC 105 ms 29840 KB
Sample_02.txt AC 107 ms 29920 KB
bmin_01.txt AC 104 ms 30008 KB
rand_01.txt AC 106 ms 30116 KB
rand_02.txt AC 105 ms 30004 KB
rand_03.txt AC 103 ms 30012 KB
rand_04.txt AC 106 ms 29992 KB
rand_05.txt AC 103 ms 29724 KB
small_01.txt AC 107 ms 30208 KB
small_02.txt AC 108 ms 29864 KB
small_03.txt AC 102 ms 30004 KB
small_04.txt AC 103 ms 29924 KB
small_05.txt AC 105 ms 29856 KB