Solved by 553 users: ...
Time limit = 2
Solomon Golomb's self-describing sequence is the only non-decreasing
sequence of positive integers with the property that it contains exactly
) occurrences of k
for each k
few moments thought reveals that the
sequence must begin as follows:
In this problem you are expected to write a program that calculates the value of f(n) given the value of n.
One line with an integer n (1 ≤ n ≤ 2 000 000 000 ).
Output the value of f(n).
Miguel Revilla, Valladolid Programming Contest Site
6 September 2003
<PREV | Problem set | Search related messages | NEXT>