<PREV Problem:
NEXT>
Solved by 929 users: ...
UserDateAttemptTimeCMSC
V.A.KeRneL13 nov 2006Ruby200.0212 
xtender27 may 2010Perl3500.0618 
kronos29 apr 2007Ruby300.0219 
lacrosse14 apr 2013Ruby1500.0220 
xtender27 may 2010Perl3200.0620 
tass21 apr 2007Ruby100.0221 
big-piglet25 sep 2007Ruby100.0221 
kronos29 apr 2007Ruby200.0221 
lacrosse14 apr 2013Ruby300.0221 
lacrosse14 apr 2013Ruby700.0221 
sb3ar01 may 2008Ruby800.0221 
Nakilon27 may 2010Ruby1200.0221 
lacrosse14 apr 2013Ruby1200.0221 
lacrosse14 apr 2013Ruby1300.0221 
xtender27 may 2010Perl3600.0621 
skim177603 jul 2011Ruby100.0222 
sb3ar30 apr 2008Ruby700.0222 
Vego12 oct 2006Python300.0622 
Languages
C++
340
FPC
205
Java
143
C
120
Kylix
61
Ruby
43
Python
30
Scheme
8
Haskell
3
Lua
2
Perl
1
 > 
 > 
 > 
 > 
 > 
 > 
 > 
 > 
 > 
 > 

Anti-factorial

Time limit = 1 second

For any given natural number n the product 1*2*...*n is called n factorial and it is denoted by n!. Given the value of n! for some integer n>=1, your task is to find n.

Input. The single line of the input data contains the value of n!. The number of decimal digits in n! does not exceed 255. Also, the given number does not contain leading zeroes.

Output. Output the single line containing the requested number n.

Input#1
1
Output#1
1

Input#2
120
Output#2
5

Author:
ACM ICPC 2005-2006, NEERC, Moscow Subregional Contest
October 23, 2005

<PREV | Problem set | Search related messages | NEXT>


© acm.mipt DevGroup
The page was generated in 200ms

SW soft NIX
ID = 75.101.220.230