## BigInt problem: got Wrong Answer

Let's talk about algorithms!

Moderator: Board moderators

kaushik_acharya
New poster
Posts: 17
Joined: Thu Jul 28, 2005 3:05 pm
Location: Bangalore, India

### BigInt problem: got Wrong Answer

http://poj.org/problem?id=2084

I got wrong answer for this problem. My algo and the implementation with my Big Int seems correct to me.
For checking the values I printed all the cases in a file.
Can anyone point me which case I am printing wrong answer:

Code: Select all

``````i = 1 :: connections: 1
i = 2 :: connections: 2
i = 3 :: connections: 5
i = 4 :: connections: 14
i = 5 :: connections: 42
i = 6 :: connections: 132
i = 7 :: connections: 429
i = 8 :: connections: 1430
i = 9 :: connections: 4862
i = 10 :: connections: 16796
i = 11 :: connections: 58786
i = 12 :: connections: 208012
i = 13 :: connections: 742900
i = 14 :: connections: 2674440
i = 15 :: connections: 9694845
i = 16 :: connections: 35357670
i = 17 :: connections: 129644790
i = 18 :: connections: 477638700
i = 19 :: connections: 1767263190
i = 20 :: connections: 6564120420
i = 21 :: connections: 24466267020
i = 22 :: connections: 91482563640
i = 23 :: connections: 343059613650
i = 24 :: connections: 1289904147324
i = 25 :: connections: 4861946401452
i = 26 :: connections: 18367353072152
i = 27 :: connections: 69533550916004
i = 28 :: connections: 263747951750360
i = 29 :: connections: 1002242216651368
i = 30 :: connections: 3814986502092304
i = 31 :: connections: 14544636039226909
i = 32 :: connections: 55534064877048198
i = 33 :: connections: 212336130412243110
i = 34 :: connections: 812944042149730764
i = 35 :: connections: 3116285494907301262
i = 36 :: connections: 11959798385860453492
i = 37 :: connections: 45950804324621742364
i = 38 :: connections: 176733862787006701400
i = 39 :: connections: 680425371729975800390
i = 40 :: connections: 2585233554129073005588
i = 41 :: connections: 9154687899805001449988
i = 42 :: connections: 33399726225349321164744
i = 43 :: connections: 124290167738943597333660
i = 44 :: connections: 468229330061196510107432
i = 45 :: connections: 1778037463738937308234584
i = 46 :: connections: 6791208839216874747196528
i = 47 :: connections: 26054751414311754531443506
i = 48 :: connections: 100317740862642891800192476
i = 49 :: connections: 387388295169850084577064636
i = 50 :: connections: 1499665457556296616915455224
i = 51 :: connections: 5817930344666810647481189276
i = 52 :: connections: 22612493753573142891881089640
i = 53 :: connections: 88031306324399882551225247864
i = 54 :: connections: 343206020689668119140126819888
i = 55 :: connections: 1339785641270196996478198772612
i = 56 :: connections: 5236274318670635302904007827512
i = 57 :: connections: 20486526876301102556629191241240
i = 58 :: connections: 80229122218273848313820744037296
i = 59 :: connections: 314468983103826870464179788627144
i = 60 :: connections: 1233600331778616551508389681313968
i = 61 :: connections: 4842778327908299677289595176554192
i = 62 :: connections: 19024527607214370809583444106333216
i = 63 :: connections: 74684356925415660627659273463958877
i = 64 :: connections: 292948028711614918644332671857070278
i = 65 :: connections: 1148309548327254776569988957856994054
i = 66 :: connections: 4499497710408537576445746169632122636
i = 67 :: connections: 17627381939133030520988612174039677118
i = 68 :: connections: 64994262947593809484468343261586372372
i = 69 :: connections: 233239145855913999564049794262328123580
i = 70 :: connections: 862310268203277251919177985655782215320
i = 71 :: connections: 3252936306469468522462837584520617717374
i = 72 :: connections: 12412428967179015838204005865194650350244
i = 73 :: connections: 47744385710317858685723413457885044161556
i = 74 :: connections: 184683690763105465666215265691068325646824
i = 75 :: connections: 717402283803204801145257410696996860148332
i = 76 :: connections: 2795970401296337764624811905240780169481480
i = 77 :: connections: 10926160549077311567080596635400985179503864
i = 78 :: connections: 42792811326171866811450918156032919514645168
i = 79 :: connections: 167916368665642449745835995362126856842814502
i = 80 :: connections: 659960615850786867789950432939242067186514676
i = 81 :: connections: 2597487638690743483849609399447657538204259924
i = 82 :: connections: 10235920554982356678366673096482131332173878824
i = 83 :: connections: 40381639256030826736919493597948907827591285076
i = 84 :: connections: 159469565959997188002519293527306344756591703352
i = 85 :: connections: 630328966651572578578916955934454086641771540968
i = 86 :: connections: 2493537767007802766635387640369241181803181505936
i = 87 :: connections: 9871697956853876661342221679230888886899894860860
i = 88 :: connections: 39108103613567252824338393112947214910545227295048
i = 89 :: connections: 155029970954812385488171659412511549018437120371432
i = 90 :: connections: 614916863839169471885653672306842940129616723373136
i = 91 :: connections: 2434333610309715547282595854925489144536213856038136
i = 92 :: connections: 9623388591622537843035045156893435090215479636986832
i = 93 :: connections: 38003479817470273509775192682990253860234817233086384
i = 94 :: connections: 149979896162298190772105987629518971133239514540071136
i = 95 :: connections: 573178486602333273028876248127109743592196316712621554
i = 96 :: connections: 2045247759380914961068712967803016452205366353087988892
i = 97 :: connections: 7528362134838436367136623798436471071981070944617654364
i = 98 :: connections: 28308385559699161101978352231129962765029908852931561400
i = 99 :: connections: 108096715456197274673298546021417243754372374344767312940
i = 100 :: connections: 416873769866697930737519874141537661579569934464477839432

``````
My experience with Fraudster khari

brianfry713
Guru
Posts: 5947
Joined: Thu Sep 01, 2011 9:09 am
Location: San Jose, CA, USA

### Re: BigInt problem: got Wrong Answer

n = 100 output is: 896519947090131496687170070074100632420837521538745909320
Check input and AC output for thousands of problems on uDebug!

kaushik_acharya
New poster
Posts: 17
Joined: Thu Jul 28, 2005 3:05 pm
Location: Bangalore, India

### Re: BigInt problem: got Wrong Answer

Can you please check if my ans wrt n=100 is the only one that is incorrect or others also?
My experience with Fraudster khari

brianfry713
Guru
Posts: 5947
Joined: Thu Sep 01, 2011 9:09 am
Location: San Jose, CA, USA

### Re: BigInt problem: got Wrong Answer

Others are also wrong.
Check input and AC output for thousands of problems on uDebug!

kaushik_acharya
New poster
Posts: 17
Joined: Thu Jul 28, 2005 3:05 pm
Location: Bangalore, India

### Re: BigInt problem: got Wrong Answer

Thanks for the help.

I realised my mistake.
Product of n digit number with another n digit number can go upto 2n digit number.
I should have taken this into consideration.
My experience with Fraudster khari