HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Contests > CEN_114 Midterm B > problem:


2. 50453 - The Cubic Difference

CEN_114 Midterm B

Start: May.14.2020 at 12:00:01 AM
Finish: May.31.2020 at 11:59:59 PM
The contest is finished!
• Contest scoreboard

Guest
• Review clarifications (1)

Contest problems

• 10. 51095 - Normal and Trace
• 11. 51089 - Multiply a row and add i...
• 12. 50749 - Min Distance
• 13. 51124 - Easy Tiae words
• 14. 51136 - Class Average 2
• 15. 50734 - Product Info (In Srt)
• 2. 50453 - The Cubic Difference
• 3. 50346 - The Biggest Date
• 5. 50380 - Sum of the Numbers in t...
• 6. 50443 - Dajte Express
• 7. 50496 - Falling Bricks
• 8. 51123 - Mr. Li Criteria
• 9. 50529 - Row to Table

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb.
Question by Ibrahim Mesecan.

The Cubic Difference

For a scientific study, your professor needs to find the smallest two consecutive numbers whose cubic difference is bigger than or equal to the given number n. For example if n is 40,

  • Cube of 2 is 8
  • Cube of 3 is 27 and cubic difference between 2 and 3 is 19
  • Cube of 4 is 64 and cubic difference between 3 and 4 is 37
  • Cube of 5 is 125 and cubic difference between 4 and 5 is 61
as a result 4 and 5 are the smallest two consecutive numbers whose cubic difference is bigger than the given number n.

Question: Write a program that gets a number (n) and finds the smallest consecutive numbers whose cubic difference is bigger than or equal to the given number n.

Input specification
You will be given an integer number (n) where 1 ≤ n ≤ 2x109.

Output specification
Show two numbers in ascending order.

 Sample Input   
  25
 Sample Output   
  3 4


Для отправки решений необходимо выполнить вход.

www.contester.ru