374 - Big Mod

All about problems in Volume 3. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

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

Re: 374 - Big Mod

Post by brianfry713 » Tue Jun 25, 2013 11:55 pm

Input:

Code: Select all

875898931
93086444
10494

2053457114
971096090
33604

2097481254
1378919796
30667

1650865812
597236599
33252

1091473074
2038076398
4808

1564115234
514985747
35489

446578237
714122882
40975

1737245610
555921644
22699

1535188015
80411905
15012

1774055344
1443769943
21328

1731733253
172185227
10712

1663072498
78158693
5762

1983500861
28156300
37151

738612059
1679022112
43830

662188943
623011539
45320

399033522
39643125
8307

1041109710
486221363
36421

1773090984
75983325
17085

1314213295
1611171340
29090

2124714906
1237743037
29994

160480945
821992642
20413

436817076
337581492
3526

1684249297
173598705
31446

15634019
912210765
16339

1091738989
1574399708
37550

2058436708
1973433230
13635

1392636527
867059292
35718

1440959227
492666628
21443

2045203572
1806879923
1956

582376173
1784111181
3593

563318718
1944592126
21947

716446490
233925554
16539

947732956
1918174852
25604

1207175721
1933808871
33469

998156951
878064212
36309

1412149720
789017273
38931

1865785615
34170152
30483

658159224
1475129379
14864

1673999807
1372849303
5507

6044434
1955225477
31321

1723315746
371060547
16319

2115096052
1087507038
17554

696974202
2035239994
45418

1599934705
1094932067
44381

1267622326
2093089019
16566

362226006
1357755091
2659

1430262917
1076057058
20231

1217875471
1734216283
13022

1498154654
1260732442
39826

1437830113
1266776876
46315

1014133105
842608974
16142

387544575
810221378
20692

2142365248
1507195580
12518

1520393477
959646637
23066

684746930
79785315
31597

727164595
442011322
29320

1558599533
1872274239
25239

276720975
942666062
17994

469971796
293337069
29028

2036071921
1731167182
9324

1262430227
597816639
22710

859849081
985361214
35528

1544774972
980242815
27240

2117457210
353152644
18817

1637587867
1037899574
6653

1103323895
1765064169
31687

1926815014
1176180054
30906

1678879544
1452901029
6980

1017676709
1922872826
11849

1617206316
1811461099
13943

1336029151
926407679
44582

1897460960
1786256760
36669

1121630499
1183548084
3124

1852995618
1153521646
44968

1396523727
643625865
25855

1019837151
1746949760
45764

1085161897
1526281127
28571

875277234
1057677023
36212

1608058633
2075353733
35370

486693454
1545076401
19530

1096495456
733621905
2561

156630450
483599217
42313

202126658
1605229717
20457

1227865681
1310741687
5116

459273700
559781766
14721

728581294
1579618917
43794

615469410
517297166
28973

1678537580
1392574400
41836

2047023131
853149386
16961

43414213
1339842840
29715

1998750042
288854648
43080

585526254
445485098
38057

958559226
647611756
8466

367656634
1875477437
27886

930275689
187267490
22452

2136520610
915848784
8082

794747995
1531318194
11828

979256507
1062372126
27521

73958394
961911610
11167

1244014015
1005325823
30219
AC output:

Code: Select all

9799
4992
21841
22188
3760
31261
9694
6421
307
19824
5053
406
5237
25231
35007
7929
6330
10989
11955
28368
9111
1354
13483
7364
37181
8419
11605
287
1584
2882
4167
3277
840
20853
24844
1138
22918
7616
4946
29770
10069
4886
45382
3290
6340
2148
17476
8979
21100
21131
5041
8397
12354
7131
12463
12385
17144
5337
832
7177
9083
7225
12008
4096
5697
24050
24148
2704
10990
3543
28229
2413
3113
28128
20632
35225
18193
16920
27043
5734
1403
16845
1355
2225
12244
12394
20414
9512
16192
14596
12576
36030
4458
9778
21913
4042
4117
16379
4813
9064
Check input and AC output for thousands of problems on uDebug!

Yusif
New poster
Posts: 27
Joined: Tue Jun 25, 2013 2:24 am

Re: 374 - Big Mod

Post by Yusif » Wed Jun 26, 2013 1:15 am

some of my output is different; guess it goes out of range somewhere
I wrote this shorter function

Code: Select all

ac
yet the same result :cry:
the only suspects are (t*b) and (b*b)
but both t and b are kept less than m witch is less than 46340
so the product of two of them will be within the range
then what is wrong? :-?
Last edited by Yusif on Fri Jul 19, 2013 8:28 am, edited 1 time in total.

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

Re: 374 - Big Mod

Post by brianfry713 » Thu Jun 27, 2013 12:56 am

I solved it recursively and used long long.
Check input and AC output for thousands of problems on uDebug!

User avatar
uDebug
A great helper
Posts: 475
Joined: Tue Jul 24, 2012 4:23 pm

Re: 374 - Big Mod

Post by uDebug » Fri Mar 21, 2014 12:45 pm

brianfry713,

Thanks for the great test cases.

It turns out that this problem's very similar to 1230 - MODEX.
Check input and AC output for over 7,500 problems on uDebug!

Find us on Facebook. Follow us on Twitter.

gautamzero
New poster
Posts: 32
Joined: Fri Oct 10, 2014 1:10 pm
Location: Sylhet, Bangladesh

Re: 374 - Big Mod

Post by gautamzero » Wed Dec 24, 2014 8:14 pm

WA??

Code: Select all

erased
None but a fool is always right..
so don't be upset when u r wrong..

Post Reply

Return to “Volume 3 (300-399)”