提出 #12750974


ソースコード 拡げる

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)

提出情報

提出日時
問題 D - I hate Factorization
ユーザ maspy
言語 Python (3.8.2)
得点 400
コード長 364 Byte
結果 AC
実行時間 108 ms
メモリ 30208 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 400 / 400
結果
AC × 2
AC × 13
セット名 テストケース
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
ケース名 結果 実行時間 メモリ
Sample_01.txt AC 105 ms 29840 KiB
Sample_02.txt AC 107 ms 29920 KiB
bmin_01.txt AC 104 ms 30008 KiB
rand_01.txt AC 106 ms 30116 KiB
rand_02.txt AC 105 ms 30004 KiB
rand_03.txt AC 103 ms 30012 KiB
rand_04.txt AC 106 ms 29992 KiB
rand_05.txt AC 103 ms 29724 KiB
small_01.txt AC 107 ms 30208 KiB
small_02.txt AC 108 ms 29864 KiB
small_03.txt AC 102 ms 30004 KiB
small_04.txt AC 103 ms 29924 KiB
small_05.txt AC 105 ms 29856 KiB