SQRT2 - Digits of SQRT(2)

In this task you are to find as many digits of the square root of 2 as possible. You have to make it within the limit of time and source code length.

Input

There is no input for this problem

Output

The output must contain as many digits of the square root of 2 as possible (max = 2000000)

Score

The score awarded to your program will be the first position of the digit where the first difference occurs.

Example

Output:
1.41421356237309504

will be awarded with 19 points.


Added by:Roman Sol
Date:2007-01-07
Time limit:2.75s
Source limit:4096B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: CLPS LISP sbcl LISP clisp ERL JS-RHINO NODEJS PERL6 VB.NET
Resource:ZCon 2007

hide comments
2024-05-20 11:08:28
haha, using the Newton iteration to calculate 1/sqrt(2), with the function f(x)=1/x^2-2
2020-06-22 06:53:45
lesser the score means more the points?? please help
=(Francky)=> No. You need to output as many digits as you can. Better the score means more the points. Those points are not given to total ranking, but rather others computed according to your rank here.

Last edit: 2020-06-22 08:12:57
2018-02-01 14:30:33
600003 using python 3. Just 6 lines of code :)

Last edit: 2018-02-02 21:26:26
2016-06-16 00:14:10
43002 using python!!
2016-04-15 21:41:13 thierry
hum ... Time limit is said to be 2.75 but i can't seem to go past 2.50 w/o getting TLE ...
weird
2016-01-22 10:11:36
got 50000 !
2015-10-27 17:24:56 rahul_verma
got 101 point
2015-08-26 05:56:17 Siddharth Singh
i got 3712 points but they arent credited in my profile till now :(
2015-08-15 10:28:30
Got 50000 using Python
2015-08-01 07:24:17
got 4000 points :D
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.