Square root of 1 in mod 1e300

Submit

Your name:
File:
Open code-statistics:

Language is selected by the extension of the file. See the list of supported languages to know the extension of your language.

Problem

Print the specified 300 digit number x according to the hints below,
though these hints may not uniquely determine the value of x for each case.

Hint 1: The square of x is equal to 1 in mod 10300.
Hint 2: The last three ditigs of x will be given as input.

-- tails

Options

exec is denied

now post-mortem time, all source codes will be revealed

Sample input:_

751

Sample output:

604375146618424928110766602983870727725667231901941561316236180836680951044276307718174243403123136593503653142226854524673706961790023941104078370652478992085606212570656397248761889074006370471472192093985361783660394122980219875666980838272377998885153153538207781991786760045215487480163574218751

Sample input:_

249

Sample output:

395624853381575071889233397016129272274332768098058438683763819163319048955723692281825756596876863406496346857773145475326293038209976058895921629347521007914393787429343602751238110925993629528527807906014638216339605877019780124333019161727622001114846846461792218008213239954784512519836425781249

Sample input:_

999

Sample output:

999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999

Ranking

Ruby _

RankUserSizeTimeDateStatistics
1mitchs410.06492015/09/20 22:50:560B / 21B / 19B
2mitchs (luck)420.06562015/09/15 10:42:560B / 23B / 16B
3gmk620.06342015/09/17 22:56:480B / 34B / 27B

Perl _

RankUserSizeTimeDateStatistics
1tails500.21972015/09/17 00:23:290B / 28B / 21B
2mitchs502.62272015/09/22 10:29:070B / 31B / 18B
3llhuii532.04642015/09/17 02:24:370B / 25B / 27B
4angel760.44252015/09/25 19:51:280B / ?B / ?B
5mitchs (tails)492.61422015/09/25 22:13:420B / 31B / 17B

Python _

RankUserSizeTimeDateStatistics
1mitchs (alt)450.11592015/09/20 22:38:120B / 27B / 15B
2xsot470.11202015/09/25 10:48:300B / 28B / 16B
3llhuii520.13942015/09/16 01:18:420B / 30B / 21B
4xsot (luck)580.19402015/09/24 20:25:410B / 30B / 26B
5gmk610.11492015/09/17 23:17:590B / 35B / 26B
6mitchs670.39842015/09/12 07:55:430B / 41B / 21B
7xnor760.09682015/09/15 10:12:470B / ?B / ?B
8rolf1350.33872015/09/12 04:25:440B / 69B / 40B

Python3 _

RankUserSizeTimeDateStatistics
1mitchs (luck)510.17602015/09/25 05:11:260B / 26B / 23B
2xsot (luck)530.16702015/09/25 20:14:560B / 27B / 24B
3mitchs540.16182015/09/20 22:40:570B / 30B / 22B
4llhuii610.27852015/09/16 01:27:090B / 33B / 28B

PARI/GP _

RankUserSizeTimeDateStatistics
1mitchs440.04812015/09/12 12:14:500B / 28B / 16B
2llhuii450.05712015/09/17 02:25:200B / 27B / 18B

Haskell _

RankUserSizeTimeDateStatistics
1henkma650.11052015/09/17 20:32:570B / 40B / 20B

Maxima _

RankUserSizeTimeDateStatistics
1mitchs570.78262015/09/22 09:57:460B / 32B / 25B

sed _

RankUserSizeTimeDateStatistics
1tails3570.04622015/09/25 09:17:150B / 332B / 23B

dc _

RankUserSizeTimeDateStatistics
1tails280.05282015/09/17 00:30:400B / 18B / 10B

Whitespace _

RankUserSizeTimeDateStatistics
1mitchs1340.04522015/09/24 05:34:170B / 0B / 0B

Befunge _

RankUserSizeTimeDateStatistics
1test17030.01432015/09/25 15:31:090B / ?B / ?B
2test13800.01332015/09/28 16:31:170B / ?B / ?B

GolfScript _

RankUserSizeTimeDateStatistics
1tails190.48082015/09/24 23:40:290B / 6B / 13B
2mitchs190.44062015/09/24 23:50:520B / 5B / 14B

gs2 _

RankUserSizeTimeDateStatistics
1mitchs140.33142015/09/20 22:57:174B / 6B / 4B
2mitchs (xsot)130.55552015/09/25 23:02:195B / 4B / 4B

FlogScript _

RankUserSizeTimeDateStatistics
1mitchs300.39502015/09/24 06:27:260B / 13B / 14B

goruby _

RankUserSizeTimeDateStatistics
1mitchs340.09052015/09/20 23:03:430B / 18B / 12B

Groovy _

RankUserSizeTimeDateStatistics
1gmk733.07582015/09/16 23:58:010B / 45B / 28B

Language Ranking_

RankLangUserSizeScore
1gs2mitchs (xsot)1310000
2GolfScripttails196842
3dctails284642
4FlogScriptmitchs304333
5gorubymitchs343823
6Rubymitchs413170
7PARI/GPmitchs442954
8Pythonmitchs (alt)452888
9Perlmitchs (tails)492653
10Python3mitchs (luck)512549
11Maximamitchs572280
12Haskellhenkma652000
13Groovygmk731780
14Whitespacemitchs134970
15sedtails357364
16Befungetest1380342

return top