立方數


Submit solution

Points: 20
Time limit: 1.0s
Memory limit: 64M

Authors:
Problem type

題目說明

<1125檢定考題>

輸入一個整數 N (有正有負),
使其加上正整數 X 後得到一個立方數Y。
找出符合條件的最小 X 。
【註】立方數: 開三方後可以得到整數的數稱為立方數,
例如:8、27、64…等。\( (\sqrt[3]{8}=2,\sqrt[3]{27}=3,\sqrt[3]{64}=4) \)

輸入

請由鍵盤輸入一整數 N (N有正有負)

輸出

請由螢幕輸出 X 及其對應的立方數 Y ,並加註為那個數的立方。
輸出格式請見範例測資輸出。

sample input & output

輸入 輸出
DataSet1 20 X=7,Y=27(3的立方)
DataSet2 -8 X=7,Y=-1(-1的立方)
DataSet3 64 X=61,Y=125(5的立方)

Comments

There are no comments at the moment.