3rd Balkan Olympiad in Informatics
Varna, Bulgaria, 5-11 October 1995
Day 1 - Problem 2 (Large numbers)
The positive integer number n is represented by k (40 <=k <= 80) digits in decimal system, and is called large number.
The problem is to write a program that, for a given large number n determines the greatest integer such that
p3+p2+3p<=n.
- Input:
Program input will be in an ASCII file named INPUT.2 . The first line contains a
large number n with k digits.
- Output:
Output should be on the standard output (screen) and should contain the integer p only.
- Example:
- Input:
1000000000000001000000000000003000000000000001
- Output:
1000000000000000