Sphere Online Judge

Computer geeks! Show off your skills and claim the job of your dreams! RecruitCoders.com

SPOJ Problem Set (tutorial)

8585. Easy Factorials

Problem code: FACKT

Write and debug a program that is a given value of the factorial, will determine its initial value of N.
And output the N and lenght of factorial of a number N + N.

N<=10^18;

NOTE

Factorial(N)=(1*2*....*(n-1)*n);

Input

Factorial of N.

Output

Two integer numbers N and length of factorial of N+N.

Example

Input:
24
Output:
4 5

Added by:Azat Taryhchiyev
Date:2011-03-19
Time limit:1s
Source limit:50000B
Languages:All
Resource:Dor's Problems

hide comments
2012-03-03 14:27:54 numerix
@krishnan: n will be positive.
2012-03-03 13:50:58 krishnan
what is the answer for 1 both 0 and 1 have their factorial as 1
SPOJ System © 2012 Sphere Research Labs | Projekty informatyczne i aplikacje na zamówienie. All Rights Reserved.