Unnamed: 0
int64 0
0
| repo_id
stringlengths 5
186
| file_path
stringlengths 15
223
| content
stringlengths 1
32.8M
⌀ |
---|---|---|---|
0 | repos/zig-ryu/src | repos/zig-ryu/src/ryu64/tables_fixed_and_scientific.zig | // Copyright 2018 Ulf Adams
//
// The contents of this file may be used under the terms of the Apache License,
// Version 2.0.
//
// (See accompanying file LICENSE-Apache or copy at
// http://www.apache.org/licenses/LICENSE-2.0)
//
// Alternatively, the contents of this file may be used under the terms of
// the Boost Software License, Version 1.0.
// (See accompanying file LICENSE-Boost or copy at
// https://www.boost.org/LICENSE_1_0.txt)
//
// Unless required by applicable law or agreed to in writing, this software
// is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied.
pub const TABLE_SIZE = 64;
pub const POW10_OFFSET = [TABLE_SIZE]u64{
0, 2, 5, 8, 12, 16, 21, 26, 32, 39,
46, 54, 62, 71, 80, 90, 100, 111, 122, 134,
146, 159, 173, 187, 202, 217, 233, 249, 266, 283,
301, 319, 338, 357, 377, 397, 418, 440, 462, 485,
508, 532, 556, 581, 606, 632, 658, 685, 712, 740,
769, 798, 828, 858, 889, 920, 952, 984, 1017, 1050,
1084, 1118, 1153, 1188,
};
// zig fmt: off
pub const POW10_SPLIT = [1224][3]u64 {
[3]u64{ 1, 72057594037927936, 0 },
[3]u64{ 699646928636035157, 72057594, 0 },
[3]u64{ 1, 0, 256 },
[3]u64{ 11902091922964236229, 4722366482869, 0 },
[3]u64{ 6760415703743915872, 4722, 0 },
[3]u64{ 1, 0, 16777216 },
[3]u64{ 13369850649504950658, 309485009821345068, 0 },
[3]u64{ 15151142278969419334, 309485009, 0 },
[3]u64{ 1, 0, 75511627776 },
[3]u64{ 4635408826454083567, 9437866644873197963, 1099 },
[3]u64{ 12367138975830625353, 20282409603651, 0 },
[3]u64{ 7555853734021184432, 20282, 0 },
[3]u64{ 1, 0, 250037927936 },
[3]u64{ 5171444645924616995, 699646928636035156, 72057594 },
[3]u64{ 16672297533003297786, 1329227995784915872, 0 },
[3]u64{ 14479142226848862515, 1329227995, 0 },
[3]u64{ 1, 0, 181645213696 },
[3]u64{ 12214193123817091081, 11902091922964236228, 114366482869 },
[3]u64{ 16592893013671929435, 6760415703743915871, 4722 },
[3]u64{ 4549827147718617003, 87112285931760, 0 },
[3]u64{ 5274510003815168971, 87112, 0 },
[3]u64{ 1, 0, 44724781056 },
[3]u64{ 9794971998307800535, 13369850649504950657, 209821345068 },
[3]u64{ 14720142899209240169, 15151142278969419333, 309485009 },
[3]u64{ 4300745446091561535, 5708990770823839524, 0 },
[3]u64{ 15197156861335443364, 5708990770, 0 },
[3]u64{ 1, 0, 139251286016 },
[3]u64{ 13484604155038683037, 4635408826454083566, 67670423947 },
[3]u64{ 8356963862052375699, 12367138975830625352, 58409603651 },
[3]u64{ 5850852848337610021, 7555853734021184431, 20282 },
[3]u64{ 2712780827214982050, 374144419156711, 0 },
[3]u64{ 7732076577307618052, 374144, 0 },
[3]u64{ 1, 0, 84280344576 },
[3]u64{ 17296309485351745867, 5171444645924616994, 160903807060 },
[3]u64{ 16598859101615853088, 16672297533003297785, 219784915872 },
[3]u64{ 7469952526870444257, 14479142226848862514, 1329227995 },
[3]u64{ 13531654022114669524, 6073184580144670117, 1 },
[3]u64{ 15757609704383306943, 24519928653, 0 },
[3]u64{ 9590990814237149590, 24, 0 },
[3]u64{ 1, 0, 196662132736 },
[3]u64{ 15408590707489433890, 12214193123817091080, 95899502532 },
[3]u64{ 18332056844289122710, 16592893013671929434, 240246646623 },
[3]u64{ 11114572877353986193, 4549827147718617002, 72285931760 },
[3]u64{ 1703393793997526525, 5274510003815168970, 87112 },
[3]u64{ 5082852056285196265, 1606938044258990, 0 },
[3]u64{ 816434266573722365, 1606938, 0 },
[3]u64{ 1, 0, 129530986496 },
[3]u64{ 5736523019264798742, 9794971998307800534, 69797980545 },
[3]u64{ 10129314776268243339, 14720142899209240168, 36233143877 },
[3]u64{ 16511595775483995364, 4300745446091561534, 50823839524 },
[3]u64{ 12367293405401453325, 15197156861335443363, 5708990770 },
[3]u64{ 16934621733248854291, 13078571300009428617, 5 },
[3]u64{ 10278280417769171336, 105312291668, 0 },
[3]u64{ 5760764486226151240, 105, 0 },
[3]u64{ 1, 0, 238731001856 },
[3]u64{ 4128368337188369761, 13484604155038683036, 72453031918 },
[3]u64{ 10240941003671005056, 8356963862052375698, 175317175368 },
[3]u64{ 17933378316822368251, 5850852848337610020, 231147060143 },
[3]u64{ 8346249813075698616, 2712780827214982049, 128419156711 },
[3]u64{ 15906203609160902695, 7732076577307618051, 374144 },
[3]u64{ 14525607416135386328, 6901746346790563, 0 },
[3]u64{ 6397156777364256320, 6901746, 0 },
[3]u64{ 1, 0, 34937634816 },
[3]u64{ 16798760952716600048, 17296309485351745866, 249899825954 },
[3]u64{ 2419982808370854967, 16598859101615853087, 50404946937 },
[3]u64{ 2922947087773078956, 7469952526870444256, 165733552434 },
[3]u64{ 15419220167069510190, 13531654022114669523, 77854221733 },
[3]u64{ 3452124642157173416, 15757609704383306942, 24519928653 },
[3]u64{ 5979700067267186899, 9590990814237149589, 24 },
[3]u64{ 4913998146922579597, 452312848583, 0 },
[3]u64{ 5771037749337678924, 452, 0 },
[3]u64{ 1, 0, 8835301376 },
[3]u64{ 3464734175350698519, 15408590707489433889, 90993782792 },
[3]u64{ 9334527711335850125, 18332056844289122709, 170602522202 },
[3]u64{ 7269882896518450106, 11114572877353986192, 202092341162 },
[3]u64{ 1372511258182263196, 1703393793997526524, 174275541962 },
[3]u64{ 7571228438575951046, 5082852056285196264, 26044258990 },
[3]u64{ 2992506536646070406, 816434266573722364, 1606938 },
[3]u64{ 524517896824344606, 29642774844752946, 0 },
[3]u64{ 15582941400898702773, 29642774, 0 },
[3]u64{ 1, 0, 214310977536 },
[3]u64{ 3846112492507251066, 5736523019264798741, 104549111254 },
[3]u64{ 16681117750123089487, 10129314776268243338, 62895095400 },
[3]u64{ 14986314536556547267, 16511595775483995363, 163670432318 },
[3]u64{ 2573712825027107389, 12367293405401453324, 137918027683 },
[3]u64{ 7504855874008324928, 16934621733248854290, 84557186697 },
[3]u64{ 9572138030626879787, 10278280417769171335, 105312291668 },
[3]u64{ 8520676959353394843, 5760764486226151239, 105 },
[3]u64{ 13448984662897903496, 1942668892225, 0 },
[3]u64{ 12338883700918130648, 1942, 0 },
[3]u64{ 1, 0, 156223799296 },
[3]u64{ 2517285787892561600, 4128368337188369760, 146555162524 },
[3]u64{ 4338831817635138103, 10240941003671005055, 36972170386 },
[3]u64{ 1561495325934523196, 17933378316822368250, 161452451108 },
[3]u64{ 12262635050079398786, 8346249813075698615, 3862277025 },
[3]u64{ 11144065765517284188, 15906203609160902694, 163787434755 },
[3]u64{ 1212260522471875711, 14525607416135386327, 242346790563 },
[3]u64{ 9695352922247418869, 6397156777364256319, 6901746 },
[3]u64{ 7227025834627242948, 127314748520905380, 0 },
[3]u64{ 9609008238705447829, 127314748, 0 },
[3]u64{ 1, 0, 74910662656 },
[3]u64{ 3609144142396852269, 16798760952716600047, 31131187530 },
[3]u64{ 11568848377382068865, 2419982808370854966, 224158453279 },
[3]u64{ 10068303578029323957, 2922947087773078955, 211835877600 },
[3]u64{ 11645070846862630231, 15419220167069510189, 190187140051 },
[3]u64{ 12449386705878485055, 3452124642157173415, 149324160190 },
[3]u64{ 15025619323517318418, 5979700067267186898, 199266388373 },
[3]u64{ 14996237555047131272, 4913998146922579596, 196312848583 },
[3]u64{ 10211005638256058413, 5771037749337678923, 452 },
[3]u64{ 1014743503555840530, 8343699359066, 0 },
[3]u64{ 12900897707145290678, 8343, 0 },
[3]u64{ 1, 0, 33187823616 },
[3]u64{ 4718003016239473662, 3464734175350698518, 149506025761 },
[3]u64{ 14865830648693666725, 9334527711335850124, 144394101141 },
[3]u64{ 14754517212823091778, 7269882896518450105, 252074403984 },
[3]u64{ 11113946551474911901, 1372511258182263195, 232410437116 },
[3]u64{ 1963520352638130630, 7571228438575951045, 252162224104 },
[3]u64{ 13342587341404964200, 2992506536646070405, 50028434172 },
[3]u64{ 6240392545013573291, 524517896824344605, 22844752946 },
[3]u64{ 14377490861349714758, 15582941400898702772, 29642774 },
[3]u64{ 1717863312631397839, 546812681195752981, 0 },
[3]u64{ 3611005143890591770, 546812681, 0 },
[3]u64{ 1, 0, 21208498176 },
[3]u64{ 13168252824351245504, 3846112492507251065, 138904285205 },
[3]u64{ 735883891883379688, 16681117750123089486, 227812409738 },
[3]u64{ 10609203866866106404, 14986314536556547266, 12139521251 },
[3]u64{ 12358191111890306470, 2573712825027107388, 18406839052 },
[3]u64{ 15229916368406413528, 7504855874008324927, 135518906642 },
[3]u64{ 7241424335568075942, 9572138030626879786, 71461906823 },
[3]u64{ 6049715868779871913, 8520676959353394842, 65729070919 },
[3]u64{ 2000548404719336762, 13448984662897903495, 150668892225 },
[3]u64{ 1410974761895205301, 12338883700918130647, 1942 },
[3]u64{ 16000132467694084868, 35835915874844, 0 },
[3]u64{ 16894908866816792556, 35835, 0 },
[3]u64{ 1, 0, 96136462336 },
[3]u64{ 589096329272056762, 2517285787892561599, 127235208544 },
[3]u64{ 7097729792403256904, 4338831817635138102, 250084648831 },
[3]u64{ 8553736750439287020, 1561495325934523195, 183664758778 },
[3]u64{ 2114152625261065696, 12262635050079398785, 38604121015 },
[3]u64{ 9817523680007641224, 11144065765517284187, 215065716774 },
[3]u64{ 13047215537500048015, 1212260522471875710, 63525586135 },
[3]u64{ 16755544192002345880, 9695352922247418868, 164391777855 },
[3]u64{ 6930119832670648356, 7227025834627242947, 60520905380 },
[3]u64{ 14560698131901886167, 9609008238705447828, 127314748 },
[3]u64{ 16408020927503338035, 2348542582773833227, 0 },
[3]u64{ 14274703510609809116, 2348542582, 0 },
[3]u64{ 1, 0, 239195652096 },
[3]u64{ 16428432973129962470, 3609144142396852268, 54627148527 },
[3]u64{ 3721112279790863774, 11568848377382068864, 171545803830 },
[3]u64{ 18032764903259620753, 10068303578029323956, 45631280555 },
[3]u64{ 18058455550468776079, 11645070846862630230, 167674882605 },
[3]u64{ 15692090139033993190, 12449386705878485054, 210814540455 },
[3]u64{ 389416944300619393, 15025619323517318417, 140812947666 },
[3]u64{ 12009691357260487293, 14996237555047131271, 75553539724 },
[3]u64{ 13494259174449809900, 10211005638256058412, 90055009355 },
[3]u64{ 18288583400616279877, 1014743503555840529, 151699359066 },
[3]u64{ 7216107869057472, 12900897707145290677, 8343 },
[3]u64{ 17237061291959073878, 153914086704665, 0 },
[3]u64{ 1599418782488783273, 153914, 0 },
[3]u64{ 1, 0, 22255763456 },
[3]u64{ 9565464987240335777, 4718003016239473661, 140805878294 },
[3]u64{ 857713933775880687, 14865830648693666724, 185799843980 },
[3]u64{ 4621617820081363356, 14754517212823091777, 155602488249 },
[3]u64{ 9630162611715632528, 11113946551474911900, 197106442651 },
[3]u64{ 9283986497984645815, 1963520352638130629, 133723303109 },
[3]u64{ 8981807745082630996, 13342587341404964199, 29338292357 },
[3]u64{ 18350140531565934622, 6240392545013573290, 180779405341 },
[3]u64{ 4411619033127524143, 14377490861349714757, 21093125556 },
[3]u64{ 1852297584111266889, 1717863312631397838, 9195752981 },
[3]u64{ 11746243463811666096, 3611005143890591769, 546812681 },
[3]u64{ 6335244004343789147, 10086913586276986678, 0 },
[3]u64{ 5109502367228239844, 10086913586, 0 },
[3]u64{ 1603272682579847821, 10, 0 },
[3]u64{ 1, 0, 121713852416 },
[3]u64{ 6609546910952910052, 13168252824351245503, 78039892345 },
[3]u64{ 3911171343112928288, 735883891883379687, 194575126094 },
[3]u64{ 5254510615100863555, 10609203866866106403, 60669938882 },
[3]u64{ 3881927570803887650, 12358191111890306469, 63825615420 },
[3]u64{ 6379348759607163190, 15229916368406413527, 42392558399 },
[3]u64{ 14595733737222406466, 7241424335568075941, 154327955754 },
[3]u64{ 14670223432002373542, 6049715868779871912, 135108449946 },
[3]u64{ 4045087795619708513, 2000548404719336761, 215076489095 },
[3]u64{ 12598467307137142718, 1410974761895205300, 28867368919 },
[3]u64{ 734704388050777108, 16000132467694084867, 251915874844 },
[3]u64{ 5682201693687285822, 16894908866816792555, 35835 },
[3]u64{ 11048712694145438788, 661055968790248, 0 },
[3]u64{ 17871025777010319485, 661055, 0 },
[3]u64{ 1, 0, 191031934976 },
[3]u64{ 15268761435931663695, 589096329272056761, 54384768703 },
[3]u64{ 5016238054648555438, 7097729792403256903, 59463698998 },
[3]u64{ 14236047313993899750, 8553736750439287019, 129114608443 },
[3]u64{ 6957759675154690848, 2114152625261065695, 91532209025 },
[3]u64{ 18439367135478514473, 9817523680007641223, 126707290971 },
[3]u64{ 8539004472540641041, 13047215537500048014, 244908319870 },
[3]u64{ 1908462039431738399, 16755544192002345879, 195375682548 },
[3]u64{ 714690453250792146, 6930119832670648355, 148789337027 },
[3]u64{ 13782189447673929633, 14560698131901886166, 11889480596 },
[3]u64{ 3584742913798803164, 16408020927503338034, 118773833227 },
[3]u64{ 4347581515245125291, 14274703510609809115, 2348542582 },
[3]u64{ 16836742268156371392, 6429475823218628948, 2 },
[3]u64{ 11764082328865615308, 43322963970, 0 },
[3]u64{ 5957633711383291746, 43, 0 },
[3]u64{ 1, 0, 44890587136 },
[3]u64{ 9917186842884466953, 16428432973129962469, 128201721900 },
[3]u64{ 4751011869809829335, 3721112279790863773, 180977558144 },
[3]u64{ 11068497969931435029, 18032764903259620752, 86978950836 },
[3]u64{ 17118056985122509954, 18058455550468776078, 62850669910 },
[3]u64{ 14607066080907684459, 15692090139033993189, 17021110334 },
[3]u64{ 11768892370493391107, 389416944300619392, 135651046673 },
[3]u64{ 4043396447647747170, 12009691357260487292, 44731525255 },
[3]u64{ 1670341095362518057, 13494259174449809899, 17991426092 },
[3]u64{ 3190817644167043165, 18288583400616279876, 181000391185 },
[3]u64{ 10425820027224322486, 7216107869057471, 25934422965 },
[3]u64{ 13139964660506311565, 17237061291959073877, 58086704665 },
[3]u64{ 2297772885416059937, 1599418782488783272, 153914 },
[3]u64{ 7677687919964523763, 2839213766779714, 0 },
[3]u64{ 14144589152747892828, 2839213, 0 },
[3]u64{ 1, 0, 253518544896 },
[3]u64{ 17069730341503660290, 9565464987240335776, 164046496765 },
[3]u64{ 18167423787163077107, 857713933775880686, 65250538404 },
[3]u64{ 3765746945827805904, 4621617820081363355, 156522052161 },
[3]u64{ 10241734342430761691, 9630162611715632527, 197503285916 },
[3]u64{ 13345717282537140784, 9283986497984645814, 103486904773 },
[3]u64{ 9313926784816939953, 8981807745082630995, 170994763111 },
[3]u64{ 550974205049535019, 18350140531565934621, 69239154346 },
[3]u64{ 4494692285504086222, 4411619033127524142, 206100413253 },
[3]u64{ 1134308559863725587, 1852297584111266888, 25636765134 },
[3]u64{ 17587558045116130233, 11746243463811666095, 54343434265 },
[3]u64{ 9817142032346161594, 6335244004343789146, 50276986678 },
[3]u64{ 6071944935834172568, 5109502367228239843, 10086913586 },
[3]u64{ 11564168293299416955, 1603272682579847820, 10 },
[3]u64{ 12458266507226064437, 186070713419, 0 },
[3]u64{ 1304432355328256915, 186, 0 },
[3]u64{ 1, 0, 191358304256 },
[3]u64{ 15946798815542087355, 6609546910952910051, 231212025023 },
[3]u64{ 12082566083831286138, 3911171343112928287, 35284847591 },
[3]u64{ 11449623684706196411, 5254510615100863554, 165210439715 },
[3]u64{ 17518743620362604446, 3881927570803887649, 215345825189 },
[3]u64{ 9451061563087633805, 6379348759607163189, 165791236311 },
[3]u64{ 13191114787623314926, 14595733737222406465, 168795274405 },
[3]u64{ 8367349876734474799, 14670223432002373541, 57219284648 },
[3]u64{ 6544253801674393507, 4045087795619708512, 180682964281 },
[3]u64{ 16113906253336597498, 12598467307137142717, 3039828404 },
[3]u64{ 10294087136797312392, 734704388050777107, 235308032771 },
[3]u64{ 9127173070014462803, 5682201693687285821, 232598951915 },
[3]u64{ 16266900839595484952, 11048712694145438787, 63968790248 },
[3]u64{ 3299745387370952632, 17871025777010319484, 661055 },
[3]u64{ 12061115182604399189, 12194330274671844, 0 },
[3]u64{ 5066801222582989646, 12194330, 0 },
[3]u64{ 1, 0, 185827721216 },
[3]u64{ 7568423425299591513, 15268761435931663694, 71271930809 },
[3]u64{ 16561505984665207377, 5016238054648555437, 235771737671 },
[3]u64{ 4329114621856906245, 14236047313993899749, 223377180907 },
[3]u64{ 1477500474861899139, 6957759675154690847, 135999600095 },
[3]u64{ 16891579639263969684, 18439367135478514472, 142462900359 },
[3]u64{ 4684451357140027420, 8539004472540641040, 151103457934 },
[3]u64{ 14727186580409080709, 1908462039431738398, 35038743447 },
[3]u64{ 15864176859687308834, 714690453250792145, 214747133987 },
[3]u64{ 1755486942842684438, 13782189447673929632, 50194329302 },
[3]u64{ 17417077516652710041, 3584742913798803163, 219235682866 },
[3]u64{ 4290982361913532783, 4347581515245125290, 84912721627 },
[3]u64{ 11826659981004351409, 16836742268156371391, 2637732180 },
[3]u64{ 932930645678090820, 11764082328865615307, 43322963970 },
[3]u64{ 12707792781328052617, 5957633711383291745, 43 },
[3]u64{ 16491596426880311906, 799167628880, 0 },
[3]u64{ 3092207065214166010, 799, 0 },
[3]u64{ 1, 0, 229537611776 },
[3]u64{ 8142946531605512550, 9917186842884466952, 157257552869 },
[3]u64{ 5328402096432654515, 4751011869809829334, 144600024477 },
[3]u64{ 1932004361303814512, 11068497969931435028, 142927971728 },
[3]u64{ 2511477647985517771, 17118056985122509953, 229791850638 },
[3]u64{ 17451375493324716694, 14607066080907684458, 128637992933 },
[3]u64{ 9489266854478998489, 11768892370493391106, 124219192960 },
[3]u64{ 8803053132063235169, 4043396447647747169, 235090549372 },
[3]u64{ 16198682197142616773, 1670341095362518056, 68172974571 },
[3]u64{ 13696242485403414202, 3190817644167043164, 191565184836 },
[3]u64{ 16409082426079859931, 10425820027224322485, 85712318911 },
[3]u64{ 11653410736879597610, 13139964660506311564, 168124562517 },
[3]u64{ 13589514120653213261, 2297772885416059936, 66416208296 },
[3]u64{ 8032934885905905774, 7677687919964523762, 173766779714 },
[3]u64{ 2753021350129449273, 14144589152747892827, 2839213 },
[3]u64{ 16974897459201404133, 52374249726338269, 0 },
[3]u64{ 13398576176159101589, 52374249, 0 },
[3]u64{ 1, 0, 160925351936 },
[3]u64{ 10284586955251725351, 17069730341503660289, 238984858016 },
[3]u64{ 5294476488634150891, 18167423787163077106, 155204141550 },
[3]u64{ 15833244538135063323, 3765746945827805903, 143555205531 },
[3]u64{ 10348512742273116664, 10241734342430761690, 182723472783 },
[3]u64{ 13658504610142595663, 13345717282537140783, 83504908982 },
[3]u64{ 11956362239240850266, 9313926784816939952, 29029868371 },
[3]u64{ 13415901703662731781, 550974205049535018, 46243657757 },
[3]u64{ 5161774027546852762, 4494692285504086221, 72061490990 },
[3]u64{ 15274384838790587711, 1134308559863725586, 175953423432 },
[3]u64{ 14233354597679374929, 17587558045116130232, 90532188335 },
[3]u64{ 4274656492162486921, 9817142032346161593, 227329160794 },
[3]u64{ 12040276505541795046, 6071944935834172567, 140626894819 },
[3]u64{ 13238307206256765457, 11564168293299416954, 75675363980 },
[3]u64{ 12850161204172713271, 12458266507226064436, 186070713419 },
[3]u64{ 17531777095001445154, 1304432355328256914, 186 },
[3]u64{ 5623628114515245990, 3432398830065, 0 },
[3]u64{ 7357116143579573377, 3432, 0 },
[3]u64{ 1, 0, 227864477696 },
[3]u64{ 3555734177475596582, 15946798815542087354, 31654997219 },
[3]u64{ 14001876724756424382, 12082566083831286137, 66620685343 },
[3]u64{ 18159905057231476140, 11449623684706196410, 33949692994 },
[3]u64{ 5585207679308509467, 17518743620362604445, 53512343073 },
[3]u64{ 13948697622866724672, 9451061563087633804, 65715091765 },
[3]u64{ 9807691927739036432, 13191114787623314925, 165453594945 },
[3]u64{ 15818010096140820918, 8367349876734474798, 96354764709 },
[3]u64{ 5629845624785010943, 6544253801674393506, 189873536608 },
[3]u64{ 9517635131137734707, 16113906253336597497, 19558043581 },
[3]u64{ 619338244618780585, 10294087136797312391, 61494785043 },
[3]u64{ 11632367007491958899, 9127173070014462802, 67881830461 },
[3]u64{ 12083314261009739916, 16266900839595484951, 124178879555 },
[3]u64{ 16880538609458881650, 3299745387370952631, 228653834364 },
[3]u64{ 17404223674486504228, 12061115182604399188, 26274671844 },
[3]u64{ 7089067015287185433, 5066801222582989645, 12194330 },
[3]u64{ 2592264228029443648, 224945689727159819, 0 },
[3]u64{ 13413731084370224440, 224945689, 0 },
[3]u64{ 1, 0, 78410285056 },
[3]u64{ 9323915941641553425, 7568423425299591512, 173897801038 },
[3]u64{ 12155831029092699564, 16561505984665207376, 229234681773 },
[3]u64{ 17397171276588232676, 4329114621856906244, 31080095461 },
[3]u64{ 11874560617553253769, 1477500474861899138, 40915694367 },
[3]u64{ 13444839516837727954, 16891579639263969683, 16253944616 },
[3]u64{ 16994416043584590671, 4684451357140027419, 30798362384 },
[3]u64{ 15879694502877015730, 14727186580409080708, 209859998750 },
[3]u64{ 4234647645735263359, 15864176859687308833, 160095165137 },
[3]u64{ 7978589901512919496, 1755486942842684437, 219944181664 },
[3]u64{ 6114237175390859894, 17417077516652710040, 170232614619 },
[3]u64{ 8658612872088282708, 4290982361913532782, 191641124522 },
[3]u64{ 10253813330683324853, 11826659981004351408, 203050574271 },
[3]u64{ 13289465061747830991, 932930645678090819, 97688890827 },
[3]u64{ 4123165538545565412, 12707792781328052616, 80894011233 },
[3]u64{ 7846417485927038481, 16491596426880311905, 31167628880 },
[3]u64{ 10562273346358018864, 3092207065214166009, 799 },
[3]u64{ 2691512658346619120, 14742040721959, 0 },
[3]u64{ 751187558544605998, 14742, 0 },
[3]u64{ 1, 0, 8441430016 },
[3]u64{ 3757709791947931308, 8142946531605512549, 214288853256 },
[3]u64{ 3452755398462519465, 5328402096432654514, 20104734166 },
[3]u64{ 3105818720159874523, 1932004361303814511, 129136147476 },
[3]u64{ 16859138458894499364, 2511477647985517770, 106946040961 },
[3]u64{ 12271894740606233755, 17451375493324716693, 2514414186 },
[3]u64{ 5429638071845793701, 9489266854478998488, 97477214466 },
[3]u64{ 145278150038876889, 8803053132063235168, 40878132321 },
[3]u64{ 9050266019724932450, 16198682197142616772, 92742474792 },
[3]u64{ 11907016253451490866, 13696242485403414201, 181889538140 },
[3]u64{ 2472757296513770735, 16409082426079859930, 140631732661 },
[3]u64{ 10558733798178239360, 11653410736879597609, 32736689036 },
[3]u64{ 15917322570831255850, 13589514120653213260, 242435466272 },
[3]u64{ 12254334656791355238, 8032934885905905773, 91149241586 },
[3]u64{ 7869542424662730262, 2753021350129449272, 221920211035 },
[3]u64{ 1378558986933000253, 16974897459201404132, 233726338269 },
[3]u64{ 13521405041909411105, 13398576176159101588, 52374249 },
[3]u64{ 3206744593298092012, 966134380754314586, 0 },
[3]u64{ 13914648122214918505, 966134380, 0 },
[3]u64{ 1, 0, 1557528576 },
[3]u64{ 1235541077112082496, 10284586955251725350, 242287014145 },
[3]u64{ 12014985518315533846, 5294476488634150890, 207858321906 },
[3]u64{ 1561535086344155741, 15833244538135063322, 218560993999 },
[3]u64{ 12761747276316224577, 10348512742273116663, 47740429018 },
[3]u64{ 9745594781103966137, 13658504610142595662, 176648155695 },
[3]u64{ 17514238702394846785, 11956362239240850265, 42727277488 },
[3]u64{ 2428898913707151713, 13415901703662731780, 205279820330 },
[3]u64{ 71666709959904945, 5161774027546852761, 18828026061 },
[3]u64{ 4049380135452919193, 15274384838790587710, 184771591698 },
[3]u64{ 18422240861777453733, 14233354597679374928, 185231729592 },
[3]u64{ 2914504416394425696, 4274656492162486920, 151652704697 },
[3]u64{ 12721377795748989418, 12040276505541795045, 122717650071 },
[3]u64{ 2626074459217717422, 13238307206256765456, 52696608634 },
[3]u64{ 4261529925046307655, 12850161204172713270, 146950399540 },
[3]u64{ 11536038685430305586, 17531777095001445153, 241304857490 },
[3]u64{ 12555757789435162768, 5623628114515245989, 104398830065 },
[3]u64{ 11905178684546080059, 7357116143579573376, 3432 },
[3]u64{ 14032797718924543051, 63316582777114, 0 },
[3]u64{ 10750340288005853484, 63316, 0 },
[3]u64{ 1, 0, 186192756736 },
[3]u64{ 9660290106216358253, 3555734177475596581, 121759043258 },
[3]u64{ 14820142034615351103, 14001876724756424381, 186984450425 },
[3]u64{ 12674041783707777619, 18159905057231476139, 157302774714 },
[3]u64{ 15386686816442679994, 5585207679308509466, 140756160413 },
[3]u64{ 5679510383719146248, 13948697622866724671, 237531676044 },
[3]u64{ 1391101719248678506, 9807691927739036431, 46857496045 },
[3]u64{ 3364596672173710517, 15818010096140820917, 162305194542 },
[3]u64{ 11276509210104319732, 5629845624785010942, 249515952034 },
[3]u64{ 5316312656902630164, 9517635131137734706, 135033574393 },
[3]u64{ 17470981304473644647, 619338244618780584, 82630591879 },
[3]u64{ 7373293636384920591, 11632367007491958898, 23655037778 },
[3]u64{ 7616810902585191937, 12083314261009739915, 183915095831 },
[3]u64{ 12740295655921903924, 16880538609458881649, 84943484855 },
[3]u64{ 18366635945916526940, 17404223674486504227, 77384299092 },
[3]u64{ 4472171448243407067, 7089067015287185432, 11140526925 },
[3]u64{ 229592460858185629, 2592264228029443647, 25727159819 },
[3]u64{ 12749672866417114996, 13413731084370224439, 224945689 },
[3]u64{ 9452256722867098693, 4149515568880992958, 0 },
[3]u64{ 16251451636418604634, 4149515568, 0 },
[3]u64{ 1, 0, 88505450496 },
[3]u64{ 4515791283442995454, 9323915941641553424, 80658968920 },
[3]u64{ 13306155670047701346, 12155831029092699563, 4943102544 },
[3]u64{ 4456930152933417601, 17397171276588232675, 130643721220 },
[3]u64{ 9089157128546489637, 11874560617553253768, 147728846210 },
[3]u64{ 12437332180345515840, 13444839516837727953, 27921269139 },
[3]u64{ 3433060408790452524, 16994416043584590670, 132860839963 },
[3]u64{ 8275594526021936172, 15879694502877015729, 33229560708 },
[3]u64{ 3846512444641107689, 4234647645735263358, 21432520225 },
[3]u64{ 6210962618469046250, 7978589901512919495, 152331453461 },
[3]u64{ 7272858906616296575, 6114237175390859893, 110469384344 },
[3]u64{ 3710743300451225347, 8658612872088282707, 176555860334 },
[3]u64{ 6424677242672030600, 10253813330683324852, 67720423344 },
[3]u64{ 11485842256170301862, 13289465061747830990, 136223517251 },
[3]u64{ 7355797963557024308, 4123165538545565411, 97425355144 },
[3]u64{ 6358188982569427273, 7846417485927038480, 249572581985 },
[3]u64{ 12475094728768767402, 10562273346358018863, 39145907193 },
[3]u64{ 17288154837907896183, 2691512658346619119, 150040721959 },
[3]u64{ 2983850577727105262, 751187558544605997, 14742 },
[3]u64{ 13918604635001185935, 271942652322184, 0 },
[3]u64{ 12033220395769876327, 271942, 0 },
[3]u64{ 1, 0, 101203705856 },
[3]u64{ 5782377197813462997, 3757709791947931307, 178187174245 },
[3]u64{ 17732139848231399226, 3452755398462519464, 111168366770 },
[3]u64{ 3628839527415562921, 3105818720159874522, 202913935727 },
[3]u64{ 3188692267613601004, 16859138458894499363, 149665260746 },
[3]u64{ 5168130193478377352, 12271894740606233754, 216294341269 },
[3]u64{ 12556227529405091290, 5429638071845793700, 96007875544 },
[3]u64{ 15087090312791441192, 145278150038876888, 196490615904 },
[3]u64{ 10281804758610642494, 9050266019724932449, 185645480644 },
[3]u64{ 14238177586158586580, 11907016253451490865, 218134048441 },
[3]u64{ 7107927498217678128, 2472757296513770734, 41572390106 },
[3]u64{ 3845814658485364450, 10558733798178239359, 76862879785 },
[3]u64{ 714293333681725946, 15917322570831255849, 109664308812 },
[3]u64{ 16766172658649116982, 12254334656791355237, 56426608749 },
[3]u64{ 812461421432632215, 7869542424662730261, 228074731832 },
[3]u64{ 15218024718633799196, 1378558986933000252, 148732996836 },
[3]u64{ 8110797782612805146, 13521405041909411104, 90173837972 },
[3]u64{ 15941193964933529227, 3206744593298092011, 108754314586 },
[3]u64{ 14144280602323277933, 13914648122214918504, 966134380 },
[3]u64{ 15072402647813125245, 17822033662586700072, 0 },
[3]u64{ 10822706091283369889, 17822033662, 0 },
[3]u64{ 15163844593710966731, 17, 0 },
[3]u64{ 1, 0, 38066978816 },
[3]u64{ 2408529687792073670, 1235541077112082495, 234651333670 },
[3]u64{ 3980682212356510808, 12014985518315533845, 26084650986 },
[3]u64{ 4202670442792148519, 1561535086344155740, 247691815706 },
[3]u64{ 9419583343154651922, 12761747276316224576, 78528309751 },
[3]u64{ 16359166491570434575, 9745594781103966136, 89949448782 },
[3]u64{ 12567727056384237385, 17514238702394846784, 4131670873 },
[3]u64{ 2068388267923286639, 2428898913707151712, 153003885060 },
[3]u64{ 5689135844565021196, 71666709959904944, 62219517337 },
[3]u64{ 3104061965171139313, 4049380135452919192, 80998671678 },
[3]u64{ 7955173880156328016, 18422240861777453732, 136157995600 },
[3]u64{ 1445179403240833754, 2914504416394425695, 229689627272 },
[3]u64{ 12538201164459126715, 12721377795748989417, 16142359781 },
[3]u64{ 7580606719088482667, 2626074459217717421, 54231018000 },
[3]u64{ 8168318283218819755, 4261529925046307654, 33625369910 },
[3]u64{ 5249615277755961676, 11536038685430305585, 165680648993 },
[3]u64{ 6312997372068219831, 12555757789435162767, 128645381029 },
[3]u64{ 9183815417025176703, 11905178684546080058, 26760719488 },
[3]u64{ 10683849953373876937, 14032797718924543050, 84582777114 },
[3]u64{ 17175012155615667568, 10750340288005853483, 63316 },
[3]u64{ 18003508288378896912, 1167984798111281, 0 },
[3]u64{ 14722554560950996951, 1167984, 0 },
[3]u64{ 1, 0, 37523685376 },
[3]u64{ 15059324482416394930, 9660290106216358252, 189803401509 },
[3]u64{ 4134778595813308312, 14820142034615351102, 171687061181 },
[3]u64{ 16321118342639660948, 12674041783707777618, 26834113963 },
[3]u64{ 1523550293123468805, 15386686816442679993, 63307886874 },
[3]u64{ 8016371634569878509, 5679510383719146247, 15075411775 },
[3]u64{ 9884220139611134110, 1391101719248678505, 181182395151 },
[3]u64{ 7218073002727840414, 3364596672173710516, 254611300789 },
[3]u64{ 16062235669481359233, 11276509210104319731, 50288197886 },
[3]u64{ 15558048660560338002, 5316312656902630163, 168947103794 },
[3]u64{ 8394398745765058609, 17470981304473644646, 114399707048 },
[3]u64{ 5693296366442904274, 7373293636384920590, 139412908146 },
[3]u64{ 11783494675061161358, 7616810902585191936, 113690652811 },
[3]u64{ 13377293110865447894, 12740295655921903923, 35995657329 },
[3]u64{ 12840734051093062130, 18366635945916526939, 24242436899 },
[3]u64{ 7009868331566697505, 4472171448243407066, 63012446232 },
[3]u64{ 5019690705031194477, 229592460858185628, 55691161151 },
[3]u64{ 8608277240439804984, 12749672866417114995, 190512407863 },
[3]u64{ 12172482590657749222, 9452256722867098692, 48880992958 },
[3]u64{ 16613484892678771990, 16251451636418604633, 4149515568 },
[3]u64{ 5721488662757049244, 2758075434182769113, 4 },
[3]u64{ 386931106438877039, 76545051729, 0 },
[3]u64{ 10054429752182825659, 76, 0 },
[3]u64{ 1, 0, 16244801536 },
[3]u64{ 8634592106137071313, 4515791283442995453, 171721328144 },
[3]u64{ 12626356501369830731, 13306155670047701345, 227241610667 },
[3]u64{ 4803333258178976933, 4456930152933417600, 136492724195 },
[3]u64{ 13613083223558209297, 9089157128546489636, 209674229128 },
[3]u64{ 16106967997237446989, 12437332180345515839, 78186106577 },
[3]u64{ 14832921244380020170, 3433060408790452523, 177448620878 },
[3]u64{ 13774024637717231397, 8275594526021936171, 126208519857 },
[3]u64{ 9673012968505228885, 3846512444641107688, 199336696958 },
[3]u64{ 5391832334264815667, 6210962618469046249, 117394262471 },
[3]u64{ 16514436292632703088, 7272858906616296574, 83201159797 },
[3]u64{ 12025036352783454153, 3710743300451225346, 180348282451 },
[3]u64{ 7059867105311401050, 6424677242672030599, 206622648756 },
[3]u64{ 12769210631552594670, 11485842256170301861, 227398758606 },
[3]u64{ 8328873878884556145, 7355797963557024307, 16344678115 },
[3]u64{ 1016565892414238685, 6358188982569427272, 47676276240 },
[3]u64{ 9662978461927250281, 12475094728768767401, 239937192751 },
[3]u64{ 13729967277551868112, 17288154837907896182, 45161754863 },
[3]u64{ 6371593776693359475, 2983850577727105261, 136754529069 },
[3]u64{ 17617208110845643245, 13918604635001185934, 70652322184 },
[3]u64{ 14960960225633086797, 12033220395769876326, 271942 },
[3]u64{ 12090634301321662558, 5016456510113118, 0 },
[3]u64{ 9409926148478635503, 5016456, 0 },
[3]u64{ 1, 0, 171313463296 },
[3]u64{ 4307062684900157136, 5782377197813462996, 168961261227 },
[3]u64{ 15300759383869911853, 17732139848231399225, 218196719784 },
[3]u64{ 16007534237643445447, 3628839527415562920, 35172859354 },
[3]u64{ 7138502295759677634, 3188692267613601003, 154280164899 },
[3]u64{ 8218537071653683708, 5168130193478377351, 164680674458 },
[3]u64{ 2254219416760329296, 12556227529405091289, 216817872804 },
[3]u64{ 3057410459568460683, 15087090312791441191, 97557377752 },
[3]u64{ 8217810929938874370, 10281804758610642493, 49771853153 },
[3]u64{ 11741126472498340929, 14238177586158586579, 238385321521 },
[3]u64{ 1175325363726654805, 7107927498217678127, 127208482030 },
[3]u64{ 9428843070696730900, 3845814658485364449, 41038721919 },
[3]u64{ 12662500978715131896, 714293333681725945, 101908896041 },
[3]u64{ 6443045597035184564, 16766172658649116981, 21044043621 },
[3]u64{ 1921385512639171183, 812461421432632214, 60824970773 },
[3]u64{ 10469475094355551399, 15218024718633799195, 32439687228 },
[3]u64{ 14679174489076953574, 8110797782612805145, 235864173856 },
[3]u64{ 11853074234719825644, 15941193964933529226, 104766762987 },
[3]u64{ 8270896886596139124, 14144280602323277932, 40817076584 },
[3]u64{ 16532667046659118126, 15072402647813125244, 254586700072 },
[3]u64{ 148341279888833483, 10822706091283369888, 17822033662 },
[3]u64{ 10364629296397276041, 15163844593710966730, 17 },
[3]u64{ 14265682585545771671, 328758493846, 0 },
[3]u64{ 13991741872911347878, 328, 0 },
[3]u64{ 1, 0, 63130566656 },
[3]u64{ 14029045786848724433, 2408529687792073669, 21215793215 },
[3]u64{ 4005878521026842341, 3980682212356510807, 92227827221 },
[3]u64{ 3428326338640386488, 4202670442792148518, 64510636636 },
[3]u64{ 1010001558294829380, 9419583343154651921, 184886832192 },
[3]u64{ 2012063724327403418, 16359166491570434574, 64681297848 },
[3]u64{ 10997154538851372612, 12567727056384237384, 96112127552 },
[3]u64{ 1917749645489607898, 2068388267923286638, 176308408672 },
[3]u64{ 9763872523711218805, 5689135844565021195, 152168271536 },
[3]u64{ 15875699078454059311, 3104061965171139312, 164431250840 },
[3]u64{ 10966529452671276106, 7955173880156328015, 95078343332 },
[3]u64{ 18073244132105736913, 1445179403240833753, 233679697247 },
[3]u64{ 4435241176994913173, 12538201164459126714, 173410945513 },
[3]u64{ 5464400086219074323, 7580606719088482666, 70442805421 },
[3]u64{ 2445909179323258812, 8168318283218819754, 49284582214 },
[3]u64{ 873962058644121211, 5249615277755961675, 143342228273 },
[3]u64{ 16675872194112650857, 6312997372068219830, 58497855631 },
[3]u64{ 10680102689274800355, 9183815417025176702, 74579172666 },
[3]u64{ 2370498083108897524, 10683849953373876936, 43931059274 },
[3]u64{ 15354400521451334666, 17175012155615667567, 49975972139 },
[3]u64{ 259991949657381021, 18003508288378896911, 112798111281 },
[3]u64{ 10335286558772966917, 14722554560950996950, 1167984 },
[3]u64{ 16337526653906757263, 21545516652742137, 0 },
[3]u64{ 12040967163702784894, 21545516, 0 },
[3]u64{ 1, 0, 108816367616 },
[3]u64{ 3373309160242342187, 15059324482416394929, 62224146796 },
[3]u64{ 13639841054510584221, 4134778595813308311, 82884769598 },
[3]u64{ 15898855427739708031, 16321118342639660947, 185082591826 },
[3]u64{ 4544387940067005419, 1523550293123468804, 7434568377 },
[3]u64{ 5281598644835398575, 8016371634569878508, 105535824647 },
[3]u64{ 13675642405083408835, 9884220139611134109, 180391292521 },
[3]u64{ 3973392623768015721, 7218073002727840413, 243870735540 },
[3]u64{ 4491285101509114191, 16062235669481359232, 19843403507 },
[3]u64{ 15002304272810270500, 15558048660560338001, 102455061267 },
[3]u64{ 17325098540619893468, 8394398745765058608, 14308634214 },
[3]u64{ 1137212864974584822, 5693296366442904273, 638784526 },
[3]u64{ 2619406097224859078, 11783494675061161357, 51725184512 },
[3]u64{ 8281347529729293732, 13377293110865447893, 91696097587 },
[3]u64{ 11344719666795450104, 12840734051093062129, 218380005723 },
[3]u64{ 17283870506679425783, 7009868331566697504, 156272117978 },
[3]u64{ 11054210518010603775, 5019690705031194476, 115466655644 },
[3]u64{ 6399455551799092885, 8608277240439804983, 68659871603 },
[3]u64{ 12930529916573967170, 12172482590657749221, 89900618820 },
[3]u64{ 14550097052337552404, 16613484892678771989, 217310162521 },
[3]u64{ 12487632712206414748, 5721488662757049243, 81020975577 },
[3]u64{ 5791017277843595715, 386931106438877038, 76545051729 },
[3]u64{ 10227264183449036113, 10054429752182825658, 76 },
[3]u64{ 2006055278511721441, 1412006979354, 0 },
[3]u64{ 128746359043876333, 1412, 0 },
[3]u64{ 1, 0, 253468082176 },
[3]u64{ 7408146306870995754, 8634592106137071312, 97684476157 },
[3]u64{ 8299024588195267962, 12626356501369830730, 128260389217 },
[3]u64{ 1497052939192040881, 4803333258178976932, 36737966720 },
[3]u64{ 16771714264265803747, 13613083223558209296, 63873160484 },
[3]u64{ 142988846654429432, 16106967997237446988, 43804094271 },
[3]u64{ 11839838367716104145, 14832921244380020169, 43746691371 },
[3]u64{ 6019646776647679765, 13774024637717231396, 232524375083 },
[3]u64{ 4611972391702034948, 9673012968505228884, 233292291816 },
[3]u64{ 16447182322205429545, 5391832334264815666, 126895249385 },
[3]u64{ 2113477168726764245, 16514436292632703087, 2651878526 },
[3]u64{ 3536261187802311516, 12025036352783454152, 135382716162 },
[3]u64{ 18444381860986709854, 7059867105311401049, 165692220295 },
[3]u64{ 4734315730275909838, 12769210631552594669, 51451509157 },
[3]u64{ 9974936316849658174, 8328873878884556144, 72055108147 },
[3]u64{ 11864423681540657642, 1016565892414238684, 169523831112 },
[3]u64{ 8207245621417902667, 9662978461927250280, 118744303017 },
[3]u64{ 7992526918695295028, 13729967277551868111, 237345404790 },
[3]u64{ 8679354522130259987, 6371593776693359474, 142955030765 },
[3]u64{ 6065763799692166461, 17617208110845643244, 102811035278 },
[3]u64{ 18143341109049024976, 14960960225633086796, 94655434598 },
[3]u64{ 15242492331283350570, 12090634301321662557, 136510113118 },
[3]u64{ 9986352353182266963, 9409926148478635502, 5016456 },
[3]u64{ 17340463289911536077, 92537289398950870, 0 },
[3]u64{ 7359344614214233035, 92537289, 0 },
[3]u64{ 1, 0, 212233486336 },
[3]u64{ 419091135888749535, 4307062684900157135, 57829455828 },
[3]u64{ 1073142712661309790, 15300759383869911852, 168867770169 },
[3]u64{ 11076438902195672286, 16007534237643445446, 235386978984 },
[3]u64{ 1820390940081322073, 7138502295759677633, 135445527787 },
[3]u64{ 18417808973944523597, 8218537071653683707, 217122201479 },
[3]u64{ 10251294197731582957, 2254219416760329295, 39165742553 },
[3]u64{ 1502394029870156428, 3057410459568460682, 61445488423 },
[3]u64{ 321014853559106075, 8217810929938874369, 211636487741 },
[3]u64{ 2390953058510591778, 11741126472498340928, 47063714515 },
[3]u64{ 10685224265907994087, 1175325363726654804, 225511138607 },
[3]u64{ 5967405799190505023, 9428843070696730899, 249686435553 },
[3]u64{ 11210723659228214761, 12662500978715131895, 53349278201 },
[3]u64{ 12327123641078462773, 6443045597035184563, 150104158517 },
[3]u64{ 1709976940107894237, 1921385512639171182, 27567551382 },
[3]u64{ 16607686590938553511, 10469475094355551398, 25795759643 },
[3]u64{ 18332088094272679457, 14679174489076953573, 138642556441 },
[3]u64{ 2946170632136780882, 11853074234719825643, 108448366218 },
[3]u64{ 4824449494694383419, 8270896886596139123, 124896237676 },
[3]u64{ 17008332258693407134, 16532667046659118125, 160008041596 },
[3]u64{ 1773419466622750661, 148341279888833482, 202561867680 },
[3]u64{ 3892343466023784379, 10364629296397276040, 150773344202 },
[3]u64{ 12001571085575422796, 14265682585545771670, 72758493846 },
[3]u64{ 12933506765500977582, 13991741872911347877, 328 },
[3]u64{ 11884830007749143734, 6064523798049, 0 },
[3]u64{ 9662368568096205337, 6064, 0 },
[3]u64{ 1, 0, 197760516096 },
[3]u64{ 16801499925276664442, 14029045786848724432, 87217159109 },
[3]u64{ 10492407990787637084, 4005878521026842340, 38185849943 },
[3]u64{ 7673849751013230269, 3428326338640386487, 17054752294 },
[3]u64{ 6046724489853072367, 1010001558294829379, 14109074193 },
[3]u64{ 3723941391207507903, 2012063724327403417, 72596156942 },
[3]u64{ 16844122108860347659, 10997154538851372611, 110103961416 },
[3]u64{ 10622020182694668027, 1917749645489607897, 11529300590 },
[3]u64{ 8741198820686854862, 9763872523711218804, 240860623371 },
[3]u64{ 6855480461211306807, 15875699078454059310, 79594496752 },
[3]u64{ 10005708458011566304, 10966529452671276105, 217979752527 },
[3]u64{ 8932093106442919061, 18073244132105736912, 186240434905 },
[3]u64{ 9062763476260756743, 4435241176994913172, 106296225722 },
[3]u64{ 13664977682032775521, 5464400086219074322, 170132593002 },
[3]u64{ 1078499125430623453, 2445909179323258811, 75047377578 },
[3]u64{ 6554586738078431161, 873962058644121210, 182904000843 },
[3]u64{ 12177313698643242883, 16675872194112650856, 126578969526 },
[3]u64{ 16615072271904633953, 10680102689274800354, 200128504958 },
[3]u64{ 16375404983106569285, 2370498083108897523, 111832363720 },
[3]u64{ 13552251831473522729, 15354400521451334665, 15014094191 },
[3]u64{ 8330500218412111874, 259991949657381020, 214560277007 },
[3]u64{ 7044338079053294004, 10335286558772966916, 249885659094 },
[3]u64{ 2688849443046530184, 16337526653906757262, 44652742137 },
[3]u64{ 855940991879596845, 12040967163702784893, 21545516 },
[3]u64{ 7344363609485825662, 397444631628981487, 0 },
[3]u64{ 11602660525134634992, 397444631, 0 },
[3]u64{ 1, 0, 177182867456 },
[3]u64{ 16945343208344873835, 3373309160242342186, 151739417265 },
[3]u64{ 9617992661337889145, 13639841054510584220, 147861878679 },
[3]u64{ 18280344933262742088, 15898855427739708030, 4246351763 },
[3]u64{ 5179975582362777795, 4544387940067005418, 236286316036 },
[3]u64{ 1798918997870037130, 5281598644835398574, 157741358060 },
[3]u64{ 6327667344756325883, 13675642405083408834, 157215398045 },
[3]u64{ 18380327574124007701, 3973392623768015720, 128243473053 },
[3]u64{ 18015447557304295289, 4491285101509114190, 81813276544 },
[3]u64{ 10315590748073249878, 15002304272810270499, 48939195473 },
[3]u64{ 7697916092577993382, 17325098540619893467, 209061648432 },
[3]u64{ 3124132817942110723, 1137212864974584821, 141141998289 },
[3]u64{ 7448238998520507049, 2619406097224859077, 213448932749 },
[3]u64{ 13892823322374205297, 8281347529729293731, 241614998485 },
[3]u64{ 11042137840046332564, 11344719666795450103, 32936960497 },
[3]u64{ 10513966307445593804, 17283870506679425782, 108599249952 },
[3]u64{ 9388437460943526958, 11054210518010603774, 55346915180 },
[3]u64{ 10967228614677896228, 6399455551799092884, 229700965431 },
[3]u64{ 2310996671540235542, 12930529916573967169, 21788762341 },
[3]u64{ 4989110555003898587, 14550097052337552403, 155676955925 },
[3]u64{ 16271452421983657679, 12487632712206414747, 110313931675 },
[3]u64{ 9523160181437090473, 5791017277843595714, 186554421102 },
[3]u64{ 13137707423765072250, 10227264183449036112, 26108748474 },
[3]u64{ 16846859744221860705, 2006055278511721440, 132006979354 },
[3]u64{ 7767140033449795569, 128746359043876332, 1412 },
[3]u64{ 17169456915721160017, 26046931378436, 0 },
[3]u64{ 17180899661833327819, 26046, 0 },
[3]u64{ 1, 0, 208401596416 },
[3]u64{ 17572520700934791416, 7408146306870995753, 74449891024 },
[3]u64{ 17968798858233825417, 8299024588195267961, 164081155402 },
[3]u64{ 15338423313945305609, 1497052939192040880, 16909196452 },
[3]u64{ 17895321323836726301, 16771714264265803746, 76007751440 },
[3]u64{ 814069333008965773, 142988846654429431, 201641838924 },
[3]u64{ 7200328959852723947, 11839838367716104144, 36326325705 },
[3]u64{ 759884557248133773, 6019646776647679764, 84250015524 },
[3]u64{ 13410165861863974851, 4611972391702034947, 50891603540 },
[3]u64{ 6278452420856351570, 16447182322205429544, 111114571826 },
[3]u64{ 9072115382556676442, 2113477168726764244, 200191701103 },
[3]u64{ 2755882551854926563, 3536261187802311515, 89999871944 },
[3]u64{ 8496072611504649269, 18444381860986709853, 237256647769 },
[3]u64{ 4122009033579215815, 4734315730275909837, 112540742381 },
[3]u64{ 10222217724450527221, 9974936316849658173, 220643171696 },
[3]u64{ 2064539481554006325, 11864423681540657641, 104444915676 },
[3]u64{ 7935605886598063693, 8207245621417902666, 207433275752 },
[3]u64{ 7805147585347548429, 7992526918695295027, 114470508751 },
[3]u64{ 5709020905457661273, 8679354522130259986, 236328825714 },
[3]u64{ 16257370307404906674, 6065763799692166460, 76983552492 },
[3]u64{ 14971258192939373646, 18143341109049024975, 93826297164 },
[3]u64{ 1133404845901376390, 15242492331283350569, 238541361245 },
[3]u64{ 9460827548162822047, 9986352353182266962, 214940028398 },
[3]u64{ 1273897659779791346, 17340463289911536076, 201398950870 },
[3]u64{ 7833262224435092783, 7359344614214233034, 92537289 },
[3]u64{ 3033420566713364587, 1707011694817242694, 0 },
[3]u64{ 15075466825360349103, 1707011694, 0 },
[3]u64{ 1, 0, 207022718976 },
[3]u64{ 2484134775182816690, 419091135888749534, 44058175183 },
[3]u64{ 18400539815335991277, 1073142712661309789, 198600454956 },
[3]u64{ 485494064952118286, 11076438902195672285, 193098683590 },
[3]u64{ 17577048805241314891, 1820390940081322072, 251998431425 },
[3]u64{ 2863946907557583807, 18417808973944523596, 79555723771 },
[3]u64{ 13045307417786230800, 10251294197731582956, 138081444943 },
[3]u64{ 12032088871615097766, 1502394029870156427, 1017402250 },
[3]u64{ 8848763446997690580, 321014853559106074, 64129613825 },
[3]u64{ 10031289150307672684, 2390953058510591777, 84579247168 },
[3]u64{ 11592215575498656563, 10685224265907994086, 19323493716 },
[3]u64{ 15894436747956898388, 5967405799190505022, 247607734547 },
[3]u64{ 2091546719588500923, 11210723659228214760, 179668254711 },
[3]u64{ 5863809244813756109, 12327123641078462772, 110092698035 },
[3]u64{ 11303008753675411245, 1709976940107894236, 166900304494 },
[3]u64{ 13238426537506910532, 16607686590938553510, 229993784486 },
[3]u64{ 17258458071023005565, 18332088094272679456, 235159712229 },
[3]u64{ 8385733444777075179, 2946170632136780881, 115261533931 },
[3]u64{ 9530757096163247300, 4824449494694383418, 45922023539 },
[3]u64{ 14423000845391072217, 17008332258693407133, 202096137261 },
[3]u64{ 10953140011159884311, 1773419466622750660, 136211004362 },
[3]u64{ 12228340237948264127, 3892343466023784378, 150650606472 },
[3]u64{ 11279134946966259189, 12001571085575422795, 165701126806 },
[3]u64{ 14640097792684582651, 12933506765500977581, 33644277925 },
[3]u64{ 6232313315128656728, 11884830007749143733, 176523798049 },
[3]u64{ 16136121832933322088, 9662368568096205336, 6064 },
[3]u64{ 15074767079673358271, 111870718431542, 0 },
[3]u64{ 13252722804829281908, 111870, 0 },
[3]u64{ 1, 0, 208910811136 },
[3]u64{ 7740175894281560509, 16801499925276664441, 228568794576 },
[3]u64{ 15670495392425593226, 10492407990787637083, 183416000228 },
[3]u64{ 15152257626756992778, 7673849751013230268, 67327793591 },
[3]u64{ 4090073428152440422, 6046724489853072366, 153201875267 },
[3]u64{ 14450327772834205584, 3723941391207507902, 67913121689 },
[3]u64{ 4466091895542494216, 16844122108860347658, 217575820867 },
[3]u64{ 10454115378553795377, 10622020182694668026, 116473861337 },
[3]u64{ 2267817233475657788, 8741198820686854861, 46371636340 },
[3]u64{ 5500455702636497521, 6855480461211306806, 73542410542 },
[3]u64{ 15178768299492252549, 10005708458011566303, 208484209737 },
[3]u64{ 7062359872332045590, 8932093106442919060, 148491293392 },
[3]u64{ 12297347290027942576, 9062763476260756742, 18740779924 },
[3]u64{ 8030124596941085588, 13664977682032775520, 187058465554 },
[3]u64{ 6526656990996654843, 1078499125430623452, 122355324859 },
[3]u64{ 6254287345256979850, 6554586738078431160, 104660133498 },
[3]u64{ 6642007136244870032, 12177313698643242882, 226900704872 },
[3]u64{ 2027592955437164718, 16615072271904633952, 243887712482 },
[3]u64{ 942718349157325567, 16375404983106569284, 9734669043 },
[3]u64{ 14617066671884002278, 13552251831473522728, 156451597321 },
[3]u64{ 6831631114396133348, 8330500218412111873, 4381874332 },
[3]u64{ 14603040013386939258, 7044338079053294003, 142145762820 },
[3]u64{ 9906106765319401103, 2688849443046530183, 125046400654 },
[3]u64{ 1396179595609933063, 855940991879596844, 239398138749 },
[3]u64{ 11524884268464976417, 7344363609485825661, 23628981487 },
[3]u64{ 382929570730827274, 11602660525134634991, 397444631 },
[3]u64{ 6109721884461301381, 7331559403129590068, 0 },
[3]u64{ 2390514825000339691, 7331559403, 0 },
[3]u64{ 6116191454763441755, 7, 0 },
[3]u64{ 1, 0, 42918608896 },
[3]u64{ 11598868771099176310, 16945343208344873834, 156521392426 },
[3]u64{ 14449966445520085105, 9617992661337889144, 126990979484 },
[3]u64{ 11675595287405614726, 18280344933262742087, 234280807038 },
[3]u64{ 15860796398550489897, 5179975582362777794, 174097519594 },
[3]u64{ 16180408435245829662, 1798918997870037129, 194343023534 },
[3]u64{ 13756992797154950706, 6327667344756325882, 104996399554 },
[3]u64{ 8830551328786758466, 18380327574124007700, 78976619368 },
[3]u64{ 16699955256560951264, 18015447557304295288, 35559209294 },
[3]u64{ 10038983627153402074, 10315590748073249877, 219417304867 },
[3]u64{ 15085100736692127346, 7697916092577993381, 245169359579 },
[3]u64{ 10007783780289711125, 3124132817942110722, 197403769845 },
[3]u64{ 17596907048353602192, 7448238998520507048, 163753131461 },
[3]u64{ 13530650344896573509, 13892823322374205296, 247598595491 },
[3]u64{ 6337724853398437005, 11042137840046332563, 246569963255 },
[3]u64{ 12768885008904063297, 10513966307445593803, 254508948214 },
[3]u64{ 2759773619512884114, 9388437460943526957, 148594534654 },
[3]u64{ 8434364600126655292, 10967228614677896227, 65125279380 },
[3]u64{ 3843827521199949338, 2310996671540235541, 19270460225 },
[3]u64{ 4661660852957808994, 4989110555003898586, 155882077203 },
[3]u64{ 15298044134177324417, 16271452421983657678, 194516251547 },
[3]u64{ 7747773274913338217, 9523160181437090472, 80712196546 },
[3]u64{ 10348785912020632966, 13137707423765072249, 224913270096 },
[3]u64{ 4175372293197190170, 16846859744221860704, 236421057504 },
[3]u64{ 11326064156813083145, 7767140033449795568, 4930758124 },
[3]u64{ 8100407170505981763, 17169456915721160016, 190931378436 },
[3]u64{ 1706556116319916846, 17180899661833327818, 26046 },
[3]u64{ 15028897280749641942, 480481077043500, 0 },
[3]u64{ 1421201742071739121, 480481, 0 },
[3]u64{ 1, 0, 41952608256 },
[3]u64{ 8480737406125178272, 17572520700934791415, 121974090537 },
[3]u64{ 10947205650755620361, 17968798858233825416, 176831497593 },
[3]u64{ 868577942165647781, 15338423313945305608, 226970107312 },
[3]u64{ 16017710019091388479, 17895321323836726300, 247044130786 },
[3]u64{ 6610879150827623375, 814069333008965772, 208390330615 },
[3]u64{ 12110095866223762092, 7200328959852723946, 20041193424 },
[3]u64{ 7756802952949470775, 759884557248133772, 3726966548 },
[3]u64{ 2941800790804618759, 13410165861863974850, 40340355587 },
[3]u64{ 11703600274199927522, 6278452420856351569, 212491800360 },
[3]u64{ 806737539257940346, 9072115382556676441, 91149396692 },
[3]u64{ 14579028397110132023, 2755882551854926562, 93460573019 },
[3]u64{ 14247808875344366934, 8496072611504649268, 205223454557 },
[3]u64{ 9713379923695279513, 4122009033579215814, 61554147533 },
[3]u64{ 2246428675703313877, 10222217724450527220, 233111918909 },
[3]u64{ 3549783776592680620, 2064539481554006324, 74430190057 },
[3]u64{ 12645029747929213033, 7935605886598063692, 51423117898 },
[3]u64{ 16279009267476580506, 7805147585347548428, 18309486643 },
[3]u64{ 343358782242907186, 5709020905457661272, 60881313810 },
[3]u64{ 10077054739085890321, 16257370307404906673, 207811593532 },
[3]u64{ 10526715404712173586, 14971258192939373645, 41061441999 },
[3]u64{ 11438715865125144243, 1133404845901376389, 82512872489 },
[3]u64{ 5040916178827294801, 9460827548162822046, 204069058130 },
[3]u64{ 16643761637275849508, 1273897659779791345, 202424641996 },
[3]u64{ 4852542977279030386, 7833262224435092782, 70164442058 },
[3]u64{ 7883373066544387129, 3033420566713364586, 110817242694 },
[3]u64{ 16699064314768500978, 15075466825360349102, 1707011694 },
[3]u64{ 6805863634444817214, 13042063791413317777, 1 },
[3]u64{ 2266540253968903500, 31488807865, 0 },
[3]u64{ 9016913589137908810, 31, 0 },
[3]u64{ 1, 0, 222134665216 },
[3]u64{ 11654451024602552034, 2484134775182816689, 93997495262 },
[3]u64{ 5299013208454526793, 18400539815335991276, 221026318685 },
[3]u64{ 14918550373926182540, 485494064952118285, 88952853725 },
[3]u64{ 6225552657491071054, 17577048805241314890, 76155254872 },
[3]u64{ 10344713496596235785, 2863946907557583806, 236707187532 },
[3]u64{ 12972405634433280209, 13045307417786230799, 139652260844 },
[3]u64{ 12911885282402784945, 12032088871615097765, 26479692427 },
[3]u64{ 6934311832970995868, 8848763446997690579, 33543797274 },
[3]u64{ 9975729197003430461, 10031289150307672683, 230628415265 },
[3]u64{ 1982857556803548935, 11592215575498656562, 62861639142 },
[3]u64{ 2095735223386298223, 15894436747956898387, 232113382974 },
[3]u64{ 7110931538347639365, 2091546719588500922, 52317877736 },
[3]u64{ 15822183724630969535, 5863809244813756108, 220612737332 },
[3]u64{ 16931982690156327501, 11303008753675411244, 166717656540 },
[3]u64{ 6740069226761666110, 13238426537506910531, 32935582886 },
[3]u64{ 3138792961008474902, 17258458071023005564, 81454591520 },
[3]u64{ 12154594426971851390, 8385733444777075178, 58516663377 },
[3]u64{ 15780127219221910902, 9530757096163247299, 157781872442 },
[3]u64{ 16421541930960194381, 14423000845391072216, 196593770909 },
[3]u64{ 7485894627196740576, 10953140011159884310, 186662899652 },
[3]u64{ 8897269432694476707, 12228340237948264126, 75611443130 },
[3]u64{ 17189823634941678805, 11279134946966259188, 173793641291 },
[3]u64{ 9585582064286255216, 14640097792684582650, 181337854381 },
[3]u64{ 12835472279575022097, 6232313315128656727, 24874740917 },
[3]u64{ 6776016669542754608, 16136121832933322087, 54817204760 },
[3]u64{ 18340015775620871027, 15074767079673358270, 254718431542 },
[3]u64{ 5254188752292365830, 13252722804829281907, 111870 },
[3]u64{ 6798802596750151183, 2063650512248692, 0 },
[3]u64{ 9449320530215272000, 2063650, 0 },
[3]u64{ 1, 0, 121419595776 },
[3]u64{ 17110720482574968811, 7740175894281560508, 91849499257 },
[3]u64{ 16172441693558688213, 15670495392425593225, 188821405531 },
[3]u64{ 6234654946353717320, 15152257626756992777, 238221723324 },
[3]u64{ 11180283100679445438, 4090073428152440421, 190783353838 },
[3]u64{ 14852260031176961272, 14450327772834205583, 10242107326 },
[3]u64{ 4481533167346438750, 4466091895542494215, 250566718730 },
[3]u64{ 4269718344362365664, 10454115378553795376, 205122938618 },
[3]u64{ 11520029752381101466, 2267817233475657787, 54298180301 },
[3]u64{ 16778682550309368417, 5500455702636497520, 223822842678 },
[3]u64{ 9687587467301363608, 15178768299492252548, 148382851295 },
[3]u64{ 10093971076828497318, 7062359872332045589, 6666640532 },
[3]u64{ 1913763026490934696, 12297347290027942575, 96435313926 },
[3]u64{ 12701450127613557000, 8030124596941085587, 220353810784 },
[3]u64{ 8974572160711134644, 6526656990996654842, 184339045596 },
[3]u64{ 9890000077336694124, 6254287345256979849, 130360063928 },
[3]u64{ 4292326716201059148, 6642007136244870031, 96109916034 },
[3]u64{ 14644519175104337420, 2027592955437164717, 68051104864 },
[3]u64{ 5051178622270136798, 942718349157325566, 40792392772 },
[3]u64{ 675983118348065839, 14617066671884002277, 1370343464 },
[3]u64{ 4431647660065117244, 6831631114396133347, 179791632385 },
[3]u64{ 8316115180008411962, 14603040013386939257, 135537011123 },
[3]u64{ 9621158095544965602, 9906106765319401102, 44075687047 },
[3]u64{ 15283478958951102072, 1396179595609933062, 125624765228 },
[3]u64{ 13981553073094447813, 11524884268464976416, 239020758653 },
[3]u64{ 4558368743929911607, 382929570730827273, 52331208687 },
[3]u64{ 15217004469858477791, 6109721884461301380, 235129590068 },
[3]u64{ 11589190369996515737, 2390514825000339690, 7331559403 },
[3]u64{ 3670624237398152929, 6116191454763441754, 7 },
[3]u64{ 13471713758418039777, 135243399970, 0 },
[3]u64{ 4489936967610296411, 135, 0 },
[3]u64{ 1, 0, 106628775936 },
[3]u64{ 9052049303222747950, 11598868771099176309, 120783334250 },
[3]u64{ 1011330006193020538, 14449966445520085104, 71632935288 },
[3]u64{ 17412075644359478612, 11675595287405614725, 194859815495 },
[3]u64{ 6358678384745980468, 15860796398550489896, 137877141698 },
[3]u64{ 15262353928842850919, 16180408435245829661, 250745768073 },
[3]u64{ 11145257686438581736, 13756992797154950705, 20478705146 },
[3]u64{ 1600562031807691890, 8830551328786758465, 120905306388 },
[3]u64{ 6775147337046626724, 16699955256560951263, 85544214392 },
[3]u64{ 15772127322106297822, 10038983627153402073, 165817764949 },
[3]u64{ 4141472200527441474, 15085100736692127345, 2542523045 },
[3]u64{ 18246007807879281267, 10007783780289711124, 168953930242 },
[3]u64{ 960746958654787123, 17596907048353602191, 112733498024 },
[3]u64{ 11355981212264408477, 13530650344896573508, 147343568752 },
[3]u64{ 1573078209576251481, 6337724853398437004, 203692202643 },
[3]u64{ 6245294478780491367, 12768885008904063296, 45149607627 },
[3]u64{ 7523292955659721510, 2759773619512884113, 35457227821 },
[3]u64{ 14454736751015226505, 8434364600126655291, 21208374307 },
[3]u64{ 7219786377781411316, 3843827521199949337, 218252709141 },
[3]u64{ 10597123082209392431, 4661660852957808993, 206829308634 },
[3]u64{ 6922353544343010714, 15298044134177324416, 168420007630 },
[3]u64{ 14317523356293377430, 7747773274913338216, 121561008808 },
[3]u64{ 4057766168681892717, 10348785912020632965, 96226347385 },
[3]u64{ 15214083611901244045, 4175372293197190169, 240613987168 },
[3]u64{ 8390569016883950721, 11326064156813083144, 80439123952 },
[3]u64{ 10680472538208175055, 8100407170505981762, 202092512592 },
[3]u64{ 12173567833130544927, 1706556116319916845, 44814718154 },
[3]u64{ 1386341248286610026, 15028897280749641941, 225077043500 },
[3]u64{ 12487300952797237352, 1421201742071739120, 480481 },
[3]u64{ 2614759871804869720, 8863311460481781, 0 },
[3]u64{ 8494389567327729477, 8863311, 0 },
[3]u64{ 1, 0, 247459741696 },
[3]u64{ 6260469580539185878, 8480737406125178271, 136593449207 },
[3]u64{ 17818573101084525841, 10947205650755620360, 8047085704 },
[3]u64{ 2201029069927307150, 868577942165647780, 28868321800 },
[3]u64{ 10397997613804897039, 16017710019091388478, 140358376476 },
[3]u64{ 14269915965770103741, 6610879150827623374, 234656489612 },
[3]u64{ 16776139909196366727, 12110095866223762091, 140420497130 },
[3]u64{ 6246513436385199720, 7756802952949470774, 194159475340 },
[3]u64{ 2926026498821554288, 2941800790804618758, 81634453442 },
[3]u64{ 15725499391028340982, 11703600274199927521, 89043733329 },
[3]u64{ 8576577277771450827, 806737539257940345, 226790330713 },
[3]u64{ 15523351176022259335, 14579028397110132022, 52772375266 },
[3]u64{ 4775158829429176134, 14247808875344366933, 198526563380 },
[3]u64{ 10141817222123532462, 9713379923695279512, 244121779142 },
[3]u64{ 12847658900242624586, 2246428675703313876, 52192434164 },
[3]u64{ 13708197964460514655, 3549783776592680619, 76685488436 },
[3]u64{ 1951540006613246932, 12645029747929213032, 12882486860 },
[3]u64{ 9979297327280092199, 16279009267476580505, 88018613516 },
[3]u64{ 15381307706282553684, 343358782242907185, 177546278232 },
[3]u64{ 10037428657543061177, 10077054739085890320, 77570654385 },
[3]u64{ 2584877324547208668, 10526715404712173585, 133620094029 },
[3]u64{ 1126624732730703576, 11438715865125144242, 158273268613 },
[3]u64{ 1501064139624981020, 5040916178827294800, 241902260126 },
[3]u64{ 5219661484955306109, 16643761637275849507, 46263056881 },
[3]u64{ 5336997298570282212, 4852542977279030385, 106427358510 },
[3]u64{ 12191131175733833362, 7883373066544387128, 174905258090 },
[3]u64{ 3707068178994436536, 16699064314768500977, 145368946606 },
[3]u64{ 5045484691732942022, 6805863634444817213, 185122869393 },
[3]u64{ 14847900542908711232, 2266540253968903499, 31488807865 },
[3]u64{ 9097257915916965135, 9016913589137908809, 31 },
[3]u64{ 2472027983230314217, 580865979874, 0 },
[3]u64{ 15974509111133272205, 580, 0 },
[3]u64{ 1, 0, 177631789056 },
[3]u64{ 12099486841948187399, 11654451024602552033, 236287260081 },
[3]u64{ 5319910566029976328, 5299013208454526792, 13808736236 },
[3]u64{ 11549214421017285864, 14918550373926182539, 74337487885 },
[3]u64{ 1998791413186046700, 6225552657491071053, 190560788042 },
[3]u64{ 17075171930090011210, 10344713496596235784, 15703235518 },
[3]u64{ 15158296003813501474, 12972405634433280208, 165699954703 },
[3]u64{ 1360083178079384115, 12911885282402784944, 211375909797 },
[3]u64{ 6167980558592741158, 6934311832970995867, 107540785363 },
[3]u64{ 3630180428124865653, 9975729197003430460, 50107490923 },
[3]u64{ 2276550099763657677, 1982857556803548934, 83113610034 },
[3]u64{ 407006713016100655, 2095735223386298222, 186385484371 },
[3]u64{ 14242579061653496002, 7110931538347639364, 204857722298 },
[3]u64{ 17944493332678643704, 15822183724630969534, 44917884620 },
[3]u64{ 987185901870869452, 16931982690156327500, 67365379884 },
[3]u64{ 5578665155415167745, 6740069226761666109, 124170154307 },
[3]u64{ 4849210377429577536, 3138792961008474901, 234658901884 },
[3]u64{ 10811995403388891862, 12154594426971851389, 195855442410 },
[3]u64{ 7051931074990177294, 15780127219221910901, 216890213571 },
[3]u64{ 2030832259446664275, 16421541930960194380, 22405811160 },
[3]u64{ 6069512651054767896, 7485894627196740575, 190482321942 },
[3]u64{ 10608701253763958799, 8897269432694476706, 244931862206 },
[3]u64{ 15700053443426906717, 17189823634941678804, 250519635444 },
[3]u64{ 17759719234725541222, 9585582064286255215, 87695812346 },
[3]u64{ 15187321568916405210, 12835472279575022096, 103367328599 },
[3]u64{ 11040156458113129594, 6776016669542754607, 190994214247 },
[3]u64{ 2800727824598008497, 18340015775620871026, 115284830142 },
[3]u64{ 2997236166375604479, 5254188752292365829, 116368563827 },
[3]u64{ 6260091886451512841, 6798802596750151182, 34512248692 },
[3]u64{ 17573059315228347474, 9449320530215271999, 2063650 },
[3]u64{ 7519453664590169251, 38067632857031246, 0 },
[3]u64{ 15809436065653866529, 38067632, 0 },
[3]u64{ 1, 0, 188927574016 },
[3]u64{ 228921437623588922, 17110720482574968810, 137876709820 },
[3]u64{ 2195862230003073884, 16172441693558688212, 9337981321 },
[3]u64{ 960207412233973688, 6234654946353717319, 101606084361 },
[3]u64{ 2464387149230492479, 11180283100679445437, 143805142629 },
[3]u64{ 3631866936444955213, 14852260031176961271, 7242944399 },
[3]u64{ 1578304441149380227, 4481533167346438749, 48231461895 },
[3]u64{ 18190538519673445181, 4269718344362365663, 59624502064 },
[3]u64{ 1271000736479934749, 11520029752381101465, 112909574203 },
[3]u64{ 18292963032817745634, 16778682550309368416, 132525165168 },
[3]u64{ 17168014021925537455, 9687587467301363607, 21547195268 },
[3]u64{ 18046757712870378949, 10093971076828497317, 175103745301 },
[3]u64{ 14857998893911743220, 1913763026490934695, 147688546991 },
[3]u64{ 11933607369968684575, 12701450127613556999, 250486512531 },
[3]u64{ 3483798509902859162, 8974572160711134643, 137536137978 },
[3]u64{ 7378828438829845831, 9890000077336694123, 143232687497 },
[3]u64{ 15791137430347699565, 4292326716201059147, 173793880975 },
[3]u64{ 17044141236829932641, 14644519175104337419, 254273824941 },
[3]u64{ 9075651910862456484, 5051178622270136797, 229036645118 },
[3]u64{ 17811207355884564095, 675983118348065838, 227240240101 },
[3]u64{ 4438638126207305937, 4431647660065117243, 121450817507 },
[3]u64{ 12507972635512950185, 8316115180008411961, 142521564025 },
[3]u64{ 14658269128098109408, 9621158095544965601, 6828519054 },
[3]u64{ 3642436268910286111, 15283478958951102071, 32757941510 },
[3]u64{ 3783099432964819561, 13981553073094447812, 9247109664 },
[3]u64{ 9497579866027539638, 4558368743929911606, 132824915465 },
[3]u64{ 3395179445046271361, 15217004469858477790, 234628251268 },
[3]u64{ 5938502732309497276, 11589190369996515736, 90198984938 },
[3]u64{ 5793671185917606255, 3670624237398152928, 34730303066 },
[3]u64{ 889272970253526588, 13471713758418039776, 135243399970 },
[3]u64{ 8594177504370135501, 4489936967610296410, 135 },
[3]u64{ 7374354721120724712, 2494800386918, 0 },
[3]u64{ 14764532643665507567, 2494, 0 },
[3]u64{ 1, 0, 117490712576 },
[3]u64{ 5392404173658087695, 9052049303222747949, 112054824309 },
[3]u64{ 4976586473237854316, 1011330006193020537, 133943910512 },
[3]u64{ 6308932742419013569, 17412075644359478611, 40344704645 },
[3]u64{ 4831846642430703059, 6358678384745980467, 29827373864 },
[3]u64{ 18139507855949846901, 15262353928842850918, 49604185629 },
[3]u64{ 4865833876326628410, 11145257686438581735, 65086766641 },
[3]u64{ 14296661839130179261, 1600562031807691889, 223367281473 },
[3]u64{ 9254773150378118248, 6775147337046626723, 217855008735 },
[3]u64{ 12174712433727875143, 15772127322106297821, 113224509657 },
[3]u64{ 705653145340915199, 4141472200527441473, 20989118065 },
[3]u64{ 17763928858962481812, 18246007807879281266, 143052082196 },
[3]u64{ 3982836567612046296, 960746958654787122, 68615608975 },
[3]u64{ 12730849277561967739, 11355981212264408476, 140085276740 },
[3]u64{ 17314488764367235908, 1573078209576251480, 64338558092 },
[3]u64{ 15951418930590301119, 6245294478780491366, 145407838528 },
[3]u64{ 7193356087283467261, 7523292955659721509, 59783592849 },
[3]u64{ 17592945625696089446, 14454736751015226504, 25391385403 },
[3]u64{ 3554461664875361428, 7219786377781411315, 97574471193 },
[3]u64{ 2213779057785318208, 10597123082209392430, 128375261537 },
[3]u64{ 3880940796082421148, 6922353544343010713, 104776154496 },
[3]u64{ 4528237545358141043, 14317523356293377429, 133219971944 },
[3]u64{ 11681196539088147363, 4057766168681892716, 25824757125 },
[3]u64{ 9835005502912643017, 15214083611901244044, 8454853657 },
[3]u64{ 4964088126040986696, 8390569016883950720, 66578989576 },
[3]u64{ 3355564873147047622, 10680472538208175054, 45659930434 },
[3]u64{ 1853093467828272927, 12173567833130544926, 213075153709 },
[3]u64{ 14755341584803008677, 1386341248286610025, 240676937941 },
[3]u64{ 4701571132542556621, 12487300952797237351, 245141746416 },
[3]u64{ 6128849686644853851, 2614759871804869719, 79460481781 },
[3]u64{ 12026867901170202094, 8494389567327729476, 8863311 },
[3]u64{ 17909760324981426303, 163499238157084246, 0 },
[3]u64{ 2897692901883393664, 163499238, 0 },
[3]u64{ 1, 0, 159339380736 },
[3]u64{ 12323704802554838154, 6260469580539185877, 8965946783 },
[3]u64{ 7135886931147821732, 17818573101084525840, 164119318024 },
[3]u64{ 15341283120292884947, 2201029069927307149, 62563676580 },
[3]u64{ 3092789040392634166, 10397997613804897038, 206773573694 },
[3]u64{ 8811761390822097865, 14269915965770103740, 171909436366 },
[3]u64{ 16870860798610218169, 16776139909196366726, 54338624171 },
[3]u64{ 17452041453591904833, 6246513436385199719, 6158620214 },
[3]u64{ 10314783684009874908, 2926026498821554287, 225852481030 },
[3]u64{ 4932636630789274903, 15725499391028340981, 121464937185 },
[3]u64{ 18143884346082124480, 8576577277771450826, 54841522553 },
[3]u64{ 2823209155405527322, 15523351176022259334, 85258861878 },
[3]u64{ 16195396106620226251, 4775158829429176133, 152549789013 },
[3]u64{ 1150544491807648944, 10141817222123532461, 212696472984 },
[3]u64{ 7767455475523884824, 12847658900242624585, 171743122900 },
[3]u64{ 15204378045683991808, 13708197964460514654, 104105793195 },
[3]u64{ 17239732561718805622, 1951540006613246931, 153540978792 },
[3]u64{ 12886430624522800062, 9979297327280092198, 49833822361 },
[3]u64{ 18162250541178258136, 15381307706282553683, 16544130097 },
[3]u64{ 17028935366700158084, 10037428657543061176, 17140126480 },
[3]u64{ 16075467823964198637, 2584877324547208667, 178061074449 },
[3]u64{ 9803858825574498304, 1126624732730703575, 80081372850 },
[3]u64{ 17464070808143041817, 1501064139624981019, 35282958416 },
[3]u64{ 17682703471239266776, 5219661484955306108, 113289319203 },
[3]u64{ 18147688354161351336, 5336997298570282211, 56660882545 },
[3]u64{ 6663423873348080051, 12191131175733833361, 241200960568 },
[3]u64{ 9417270363716235133, 3707068178994436535, 61273516273 },
[3]u64{ 9295013721571344179, 5045484691732942021, 75804906301 },
[3]u64{ 6199479138350037783, 14847900542908711231, 73493163339 },
[3]u64{ 887603005365085688, 9097257915916965134, 226134008905 },
[3]u64{ 333989628642975696, 2472027983230314216, 68865979874 },
[3]u64{ 4620735991403939439, 15974509111133272204, 580 },
[3]u64{ 12418523063962801201, 10715086071862, 0 },
[3]u64{ 1587745622680169419, 10715, 0 },
[3]u64{ 1, 0, 225655914496 },
[3]u64{ 10968905082284365638, 12099486841948187398, 72288392929 },
[3]u64{ 14076907092801977812, 5319910566029976327, 139626084168 },
[3]u64{ 3438322122816124202, 11549214421017285863, 77108354699 },
[3]u64{ 14645413324829073676, 1998791413186046699, 8925646925 },
[3]u64{ 12271281439492289999, 17075171930090011209, 208821732872 },
[3]u64{ 6233751789862708246, 15158296003813501473, 176073730256 },
[3]u64{ 1962644459455827991, 1360083178079384114, 155334366896 },
[3]u64{ 8726934184642952500, 6167980558592741157, 60196792475 },
[3]u64{ 4531087719737475147, 3630180428124865652, 6123412028 },
[3]u64{ 481513520412720775, 2276550099763657676, 110022063878 },
[3]u64{ 992149349835802669, 407006713016100654, 68772091758 },
[3]u64{ 11165474436676191361, 14242579061653496001, 190972772932 },
[3]u64{ 10240785855143707184, 17944493332678643703, 76053515454 },
[3]u64{ 10059329918238932466, 987185901870869451, 61302420044 },
[3]u64{ 14791716450947031886, 5578665155415167744, 21262876221 },
[3]u64{ 15378882314737417403, 4849210377429577535, 125586119445 },
[3]u64{ 14726970229242271128, 10811995403388891861, 117382285949 },
[3]u64{ 5090110549507128156, 7051931074990177293, 76110091637 },
[3]u64{ 17185220781106503841, 2030832259446664274, 223329028940 },
[3]u64{ 9858517691519529306, 6069512651054767895, 162575098847 },
[3]u64{ 5595905546638020703, 10608701253763958798, 212851101602 },
[3]u64{ 15555173226968030256, 15700053443426906716, 111962756308 },
[3]u64{ 10745236628845355771, 17759719234725541221, 16823306351 },
[3]u64{ 9973314042399760760, 15187321568916405209, 47598488080 },
[3]u64{ 4374506813558796576, 11040156458113129593, 114151827759 },
[3]u64{ 15960826480426749933, 2800727824598008496, 5162480498 },
[3]u64{ 9636454862798615738, 2997236166375604478, 14339360261 },
[3]u64{ 17973331528911319269, 6260091886451512840, 63952637454 },
[3]u64{ 7366495200039369602, 17573059315228347473, 78407630399 },
[3]u64{ 10505831326526933399, 7519453664590169250, 176857031246 },
[3]u64{ 2803218632575724145, 15809436065653866528, 38067632 },
[3]u64{ 8425731874431741636, 702223880805592151, 0 },
[3]u64{ 14860552245711912111, 702223880, 0 },
[3]u64{ 1, 0, 234012409856 },
[3]u64{ 6993664200669526994, 228921437623588921, 212119037930 },
[3]u64{ 4065363582031999356, 2195862230003073883, 71052052948 },
[3]u64{ 6899780515342669867, 960207412233973687, 189133594695 },
[3]u64{ 17713500890201844939, 2464387149230492478, 247196883901 },
[3]u64{ 6445781125105107086, 3631866936444955212, 93085560055 },
[3]u64{ 13563044070717478571, 1578304441149380226, 223986111069 },
[3]u64{ 13167612994149348885, 18190538519673445180, 153068901087 },
[3]u64{ 5505463469596727288, 1271000736479934748, 96991663513 },
[3]u64{ 12125446212518819372, 18292963032817745633, 151930679904 },
[3]u64{ 12537707724735421794, 17168014021925537454, 165978316695 },
[3]u64{ 15173675086703777069, 18046757712870378948, 167805453733 },
[3]u64{ 13535510174093048476, 14857998893911743219, 7646922151 },
[3]u64{ 10698912997087096629, 11933607369968684574, 179188857095 },
[3]u64{ 16952559548431933861, 3483798509902859161, 107400007091 },
[3]u64{ 13528255827744249993, 7378828438829845830, 75856039275 },
[3]u64{ 14122167436324771955, 15791137430347699564, 11923964747 },
[3]u64{ 13071007137740038297, 17044141236829932640, 221491992075 },
[3]u64{ 13011887609328904025, 9075651910862456483, 46965547485 },
[3]u64{ 3116434332871336590, 17811207355884564094, 59240619054 },
[3]u64{ 9050993820536772770, 4438638126207305936, 57678058555 },
[3]u64{ 11993719123438634238, 12507972635512950184, 225794626361 },
[3]u64{ 1414857165879849301, 14658269128098109407, 119197456865 },
[3]u64{ 13819438220812375094, 3642436268910286110, 196205082231 },
[3]u64{ 6073063033888264440, 3783099432964819560, 54514864836 },
[3]u64{ 6828883869150720294, 9497579866027539637, 222184053046 },
[3]u64{ 4548265621068768345, 3395179445046271360, 152321926878 },
[3]u64{ 10422524923581371874, 5938502732309497275, 224314075544 },
[3]u64{ 1858996082510682634, 5793671185917606254, 224048207584 },
[3]u64{ 890276727450878316, 889272970253526587, 90465891296 },
[3]u64{ 3886008133802710905, 8594177504370135500, 102399764570 },
[3]u64{ 612074409233016757, 7374354721120724711, 190800386918 },
[3]u64{ 3927020336901729264, 14764532643665507566, 2494 },
[3]u64{ 5298603480094474942, 46020944252475, 0 },
[3]u64{ 17418383752590430025, 46020, 0 },
[3]u64{ 1, 0, 45292322816 },
[3]u64{ 8973799690601597929, 5392404173658087694, 121269781293 },
[3]u64{ 1343055462055792431, 4976586473237854315, 83342007929 },
[3]u64{ 17425118728683169659, 6308932742419013568, 51261934931 },
[3]u64{ 18389781726026675967, 4831846642430703058, 102983344691 },
[3]u64{ 272526939565961561, 18139507855949846900, 231263777382 },
[3]u64{ 11293026845930963228, 4865833876326628409, 113775023591 },
[3]u64{ 13997416438903902597, 14296661839130179260, 163501702257 },
[3]u64{ 6186605805999441184, 9254773150378118247, 221659992483 },
[3]u64{ 4401776373281836138, 12174712433727875142, 65038253533 },
[3]u64{ 16338917089754547008, 705653145340915198, 114962984513 },
[3]u64{ 13337700757935003056, 17763928858962481811, 50215910002 },
[3]u64{ 14612496890816348693, 3982836567612046295, 156690140722 },
[3]u64{ 3219935399907691719, 12730849277561967738, 88938620316 },
[3]u64{ 10887238730052330387, 17314488764367235907, 102864728152 },
[3]u64{ 360256418697768294, 15951418930590301118, 37389952614 },
[3]u64{ 321440824631118565, 7193356087283467260, 136953715493 },
[3]u64{ 10069228080701402580, 17592945625696089445, 243192687752 },
[3]u64{ 9428069607611622975, 3554461664875361427, 46120009203 },
[3]u64{ 14736799017468812344, 2213779057785318207, 153210386222 },
[3]u64{ 10875332567307979280, 3880940796082421147, 149245476249 },
[3]u64{ 4611492910339012807, 4528237545358141042, 108633238933 },
[3]u64{ 10743508637597314786, 11681196539088147362, 140533156716 },
[3]u64{ 9356196315668016028, 9835005502912643016, 128269103756 },
[3]u64{ 15755598617722189347, 4964088126040986695, 206181905536 },
[3]u64{ 1275276394173375542, 3355564873147047621, 30100456398 },
[3]u64{ 12644999363867216251, 1853093467828272926, 105799888670 },
[3]u64{ 4553830511509832021, 14755341584803008676, 103254872681 },
[3]u64{ 8869400642218174412, 4701571132542556620, 87332245607 },
[3]u64{ 16570849151159054040, 6128849686644853850, 68651977815 },
[3]u64{ 16127119334101797673, 12026867901170202093, 86970890052 },
[3]u64{ 9686867250420930550, 17909760324981426302, 230157084246 },
[3]u64{ 10678226869774428035, 2897692901883393663, 163499238 },
[3]u64{ 7767227962910162068, 3016028602530220424, 0 },
[3]u64{ 9780840471948993674, 3016028602, 0 },
[3]u64{ 1, 0, 213668069376 },
[3]u64{ 6288709332106746357, 12323704802554838153, 16386837205 },
[3]u64{ 9066785620141948673, 7135886931147821731, 141831652624 },
[3]u64{ 8442375916704414909, 15341283120292884946, 14167660429 },
[3]u64{ 11604629218100425803, 3092789040392634165, 188477686542 },
[3]u64{ 3877248044010875762, 8811761390822097864, 134914571196 },
[3]u64{ 16435137704395217283, 16870860798610218168, 103946077062 },
[3]u64{ 14994442577577813271, 17452041453591904832, 111559165543 },
[3]u64{ 4410105917142436089, 10314783684009874907, 245267398767 },
[3]u64{ 4632574728444936970, 4932636630789274902, 202983581941 },
[3]u64{ 9117147535650050359, 18143884346082124479, 134153046474 },
[3]u64{ 588939301256904809, 2823209155405527321, 69877954182 },
[3]u64{ 324393982565305683, 16195396106620226250, 173062371141 },
[3]u64{ 9380909186923521175, 1150544491807648943, 73421074605 },
[3]u64{ 4463385697777230217, 7767455475523884823, 94824230985 },
[3]u64{ 16378985502426333808, 15204378045683991807, 211934567774 },
[3]u64{ 18210894922387834354, 17239732561718805621, 38698574803 },
[3]u64{ 1555748035329493205, 12886430624522800061, 83984577574 },
[3]u64{ 4277055533891898507, 18162250541178258135, 184923140435 },
[3]u64{ 11574429772510874408, 17028935366700158083, 219871452856 },
[3]u64{ 17391099253493808815, 16075467823964198636, 215531468251 },
[3]u64{ 5791212393959129882, 9803858825574498303, 27946729175 },
[3]u64{ 11254268231455680880, 17464070808143041816, 124958581275 },
[3]u64{ 16355477587312235322, 17682703471239266775, 227983788156 },
[3]u64{ 2411485149249320633, 18147688354161351335, 145361224931 },
[3]u64{ 12763114642070638360, 6663423873348080050, 183510511249 },
[3]u64{ 1147543073987366419, 9417270363716235132, 197503883703 },
[3]u64{ 8410777835225272692, 9295013721571344178, 63336074437 },
[3]u64{ 8134725822306818018, 6199479138350037782, 14048117055 },
[3]u64{ 8899607004752328377, 887603005365085687, 232018105614 },
[3]u64{ 690976506652396830, 333989628642975695, 140250490600 },
[3]u64{ 12281570945595192074, 4620735991403939438, 54673209484 },
[3]u64{ 12592957291365552899, 12418523063962801200, 219086071862 },
[3]u64{ 13595807339013970272, 1587745622680169418, 10715 },
[3]u64{ 9698096389749839992, 197658450495420, 0 },
[3]u64{ 8310173728816391804, 197658, 0 },
};
// zig fmt: on
pub const TABLE_SIZE_2 = 69;
pub const ADDITIONAL_BITS_2 = 120;
pub const POW10_OFFSET_2 = [TABLE_SIZE_2]u16{
0, 2, 6, 12, 20, 29, 40, 52, 66, 80,
95, 112, 130, 150, 170, 192, 215, 240, 265, 292,
320, 350, 381, 413, 446, 480, 516, 552, 590, 629,
670, 712, 755, 799, 845, 892, 940, 989, 1040, 1092,
1145, 1199, 1254, 1311, 1369, 1428, 1488, 1550, 1613, 1678,
1743, 1810, 1878, 1947, 2017, 2088, 2161, 2235, 2311, 2387,
2465, 2544, 2625, 2706, 2789, 2873, 2959, 3046, 3133,
};
pub const MIN_BLOCK_2 = [TABLE_SIZE_2]u8{
0, 0, 0, 0, 0, 0, 1, 1, 2, 3,
3, 4, 4, 5, 5, 6, 6, 7, 7, 8,
8, 9, 9, 10, 11, 11, 12, 12, 13, 13,
14, 14, 15, 15, 16, 16, 17, 17, 18, 19,
19, 20, 20, 21, 21, 22, 22, 23, 23, 24,
24, 25, 26, 26, 27, 27, 28, 28, 29, 29,
30, 30, 31, 31, 32, 32, 33, 34, 0,
};
// zig fmt: off
pub const POW10_SPLIT_2 = [3133][3]u64 {
[3]u64{ 0, 0, 3906250 },
[3]u64{ 0, 0, 202000000000 },
[3]u64{ 0, 11153727427136454656, 59 },
[3]u64{ 0, 7205759403792793600, 59604644775 },
[3]u64{ 0, 0, 167390625000 },
[3]u64{ 0, 0, 232000000000 },
[3]u64{ 0, 16777216000000000, 0 },
[3]u64{ 0, 12945425605062557696, 909494 },
[3]u64{ 0, 4388757836872548352, 182701772928 },
[3]u64{ 0, 1152921504606846976, 128237915039 },
[3]u64{ 0, 0, 159062500000 },
[3]u64{ 0, 0, 160000000000 },
[3]u64{ 0, 256000000000, 0 },
[3]u64{ 0, 16192327041775828992, 13 },
[3]u64{ 0, 15024075324038053888, 13877787807 },
[3]u64{ 0, 5449091666327633920, 159814456755 },
[3]u64{ 0, 2494994193563254784, 179295395851 },
[3]u64{ 0, 4611686018427387904, 11135253906 },
[3]u64{ 0, 0, 146250000000 },
[3]u64{ 0, 0, 128000000000 },
[3]u64{ 0, 3906250, 0 },
[3]u64{ 0, 3906250000000000, 0 },
[3]u64{ 0, 4368439412768899072, 211758 },
[3]u64{ 0, 1563676642168012800, 46236813575 },
[3]u64{ 0, 11532349341402398720, 7084767080 },
[3]u64{ 0, 9048364970084925440, 104625169910 },
[3]u64{ 0, 16609275425742389248, 246490512847 },
[3]u64{ 0, 0, 207900390625 },
[3]u64{ 0, 0, 225000000000 },
[3]u64{ 11153727427136454656, 59, 0 },
[3]u64{ 7205759403792793600, 59604644775, 0 },
[3]u64{ 0, 4264412554261970152, 3 },
[3]u64{ 0, 14485570586272534528, 3231174267 },
[3]u64{ 0, 17827675094632103936, 123785264354 },
[3]u64{ 0, 7347197909193981952, 226966440203 },
[3]u64{ 0, 13677404030777688064, 11398292396 },
[3]u64{ 0, 3810326759732150272, 172741453558 },
[3]u64{ 0, 9943947977234055168, 246206558227 },
[3]u64{ 0, 0, 19539062500 },
[3]u64{ 0, 0, 228000000000 },
[3]u64{ 12945425605062557696, 909494, 0 },
[3]u64{ 4388757836872548352, 909494701772928, 0 },
[3]u64{ 1152921504606846976, 14878706826214591391, 49303 },
[3]u64{ 0, 4387341015746028192, 151806576313 },
[3]u64{ 0, 651726680428265472, 185237838233 },
[3]u64{ 0, 2570638187944738816, 153035330174 },
[3]u64{ 0, 7419175577111756800, 126139354575 },
[3]u64{ 0, 17299322326264840192, 207402194313 },
[3]u64{ 0, 7990511638862102528, 137937798142 },
[3]u64{ 0, 16717361816799281152, 254433166503 },
[3]u64{ 0, 0, 167906250000 },
[3]u64{ 0, 0, 16000000000 },
[3]u64{ 16192327041775828992, 13, 0 },
[3]u64{ 15024075324038053888, 13877787807, 0 },
[3]u64{ 5449091666327633920, 13877787807814456755, 0 },
[3]u64{ 2494994193563254784, 9707857417284919307, 752316384 },
[3]u64{ 4611686018427387904, 1844515466944871826, 224526264005 },
[3]u64{ 0, 15167599819856275072, 197099991383 },
[3]u64{ 0, 14830185305589481472, 87822237233 },
[3]u64{ 0, 6163721531743535104, 49803945956 },
[3]u64{ 0, 14122847407012052992, 228334136013 },
[3]u64{ 0, 335491783960035328, 205765601092 },
[3]u64{ 0, 941252322120433664, 68018187046 },
[3]u64{ 0, 11529215046068469760, 38051025390 },
[3]u64{ 0, 0, 238625000000 },
[3]u64{ 0, 0, 64000000000 },
[3]u64{ 4368439412768899072, 211758, 0 },
[3]u64{ 1563676642168012800, 211758236813575, 0 },
[3]u64{ 11532349341402398720, 8061591463141767016, 11479 },
[3]u64{ 9048364970084925440, 16628725344207857142, 215437019748 },
[3]u64{ 16609275425742389248, 3555541870038531535, 100901445007 },
[3]u64{ 0, 18316647450161853665, 143192746310 },
[3]u64{ 0, 16709574568378075648, 70992947447 },
[3]u64{ 0, 7696022835795591168, 247905827852 },
[3]u64{ 0, 16664449640376041472, 12417202233 },
[3]u64{ 0, 3109186955116544000, 57903381625 },
[3]u64{ 0, 10515518101817131008, 121168549362 },
[3]u64{ 0, 9961962375743537152, 242570047378 },
[3]u64{ 0, 9223372036854775808, 146540039062 },
[3]u64{ 0, 0, 150500000000 },
[3]u64{ 14485570586272534528, 3231174267, 0 },
[3]u64{ 17827675094632103936, 3231174267785264354, 0 },
[3]u64{ 7347197909193981952, 748977172262750475, 175162308 },
[3]u64{ 13677404030777688064, 15965033457315095468, 196040602133 },
[3]u64{ 3810326759732150272, 16809402149066729206, 21865466197 },
[3]u64{ 9943947977234055168, 7563769067065700371, 85911239516 },
[3]u64{ 0, 13550322810840051428, 92410032742 },
[3]u64{ 0, 8663209637545764864, 102734564471 },
[3]u64{ 0, 8969247575312957440, 119469633535 },
[3]u64{ 0, 6193172891660451840, 255486223885 },
[3]u64{ 0, 3427954273864908800, 13335732575 },
[3]u64{ 0, 10058367555266936832, 95185829773 },
[3]u64{ 0, 13907115649320091648, 141545265197 },
[3]u64{ 0, 0, 45753906250 },
[3]u64{ 0, 0, 74000000000 },
[3]u64{ 14878706826214591391, 49303, 0 },
[3]u64{ 4387341015746028192, 49303806576313, 0 },
[3]u64{ 651726680428265472, 14106411361315920281, 2672 },
[3]u64{ 2570638187944738816, 3609034283485221502, 112764710092 },
[3]u64{ 7419175577111756800, 9896072247338192335, 204195646140 },
[3]u64{ 17299322326264840192, 8889095178479228297, 188536467151 },
[3]u64{ 7990511638862102528, 3631796911038383102, 207481878815 },
[3]u64{ 16717361816799281152, 898318840772166823, 31196880105 },
[3]u64{ 0, 17293677953982795024, 233048697961 },
[3]u64{ 0, 7353628266884669440, 105937492160 },
[3]u64{ 0, 2404693032470315008, 192398640987 },
[3]u64{ 0, 9191155893041889280, 91130358670 },
[3]u64{ 0, 6353946855033798656, 142498253559 },
[3]u64{ 0, 3767824038248841216, 247344448149 },
[3]u64{ 0, 7205759403792793600, 149204254150 },
[3]u64{ 0, 0, 198390625000 },
[3]u64{ 0, 0, 232000000000 },
[3]u64{ 9707857417284919307, 752316384, 0 },
[3]u64{ 1844515466944871826, 752316384526264005, 0 },
[3]u64{ 15167599819856275072, 17063068157692817751, 40783152 },
[3]u64{ 14830185305589481472, 5385330256507239985, 48924990778 },
[3]u64{ 6163721531743535104, 3373050282752075748, 58291939338 },
[3]u64{ 14122847407012052992, 4116064001262906061, 10182853422 },
[3]u64{ 335491783960035328, 11306582046748043076, 46223132276 },
[3]u64{ 941252322120433664, 17035410946089626406, 116612931040 },
[3]u64{ 11529215046068469760, 15618595715183448558, 224923491477 },
[3]u64{ 0, 5141740092277295680, 149846685770 },
[3]u64{ 0, 16973644291514990592, 74278734288 },
[3]u64{ 0, 14625255268443750400, 208920143100 },
[3]u64{ 0, 14021170507320131584, 252792836676 },
[3]u64{ 0, 4451355232865091584, 68760089176 },
[3]u64{ 0, 12891553933348044800, 88241308450 },
[3]u64{ 0, 1152921504606846976, 34698852539 },
[3]u64{ 0, 0, 187062500000 },
[3]u64{ 0, 0, 160000000000 },
[3]u64{ 8061591463141767016, 11479, 0 },
[3]u64{ 16628725344207857142, 11479437019748, 0 },
[3]u64{ 3555541870038531535, 5562205901560339855, 622 },
[3]u64{ 18316647450161853665, 2106077949367544134, 110301527786 },
[3]u64{ 16709574568378075648, 7496855998374373623, 234114170714 },
[3]u64{ 7696022835795591168, 229183437194837004, 90406405378 },
[3]u64{ 16664449640376041472, 465169186276472889, 2012424059 },
[3]u64{ 3109186955116544000, 2152980561625316473, 123025216872 },
[3]u64{ 10515518101817131008, 2059790725449340402, 104116713310 },
[3]u64{ 9961962375743537152, 17891190926410198930, 94111661478 },
[3]u64{ 9223372036854775808, 9930696175609809814, 166969883403 },
[3]u64{ 0, 7276914261609005312, 11538344118 },
[3]u64{ 0, 10539762974036983808, 182394482312 },
[3]u64{ 0, 12851089458992250880, 136571361695 },
[3]u64{ 0, 9449311677678878720, 159696658955 },
[3]u64{ 0, 8699564697382289408, 11512248212 },
[3]u64{ 0, 4224376450473525248, 148471604347 },
[3]u64{ 0, 4611686018427387904, 123229003906 },
[3]u64{ 0, 0, 130250000000 },
[3]u64{ 0, 0, 128000000000 },
[3]u64{ 748977172262750475, 175162308, 0 },
[3]u64{ 15965033457315095468, 175162308040602133, 0 },
[3]u64{ 16809402149066729206, 13756840147955779925, 9495567 },
[3]u64{ 7563769067065700371, 13788447602092505948, 15745759798 },
[3]u64{ 13550322810840051428, 4972540435632173670, 54747473242 },
[3]u64{ 8663209637545764864, 2844874687533091959, 90269561957 },
[3]u64{ 8969247575312957440, 15377573779532804095, 101154220965 },
[3]u64{ 6193172891660451840, 17824715805091194381, 165833619944 },
[3]u64{ 3427954273864908800, 18277569135638159711, 232966279779 },
[3]u64{ 10058367555266936832, 4254645803379752845, 99990829008 },
[3]u64{ 13907115649320091648, 2933643244178200621, 208230644811 },
[3]u64{ 0, 17188148801879487562, 75159033118 },
[3]u64{ 0, 11069762501163246592, 30931771413 },
[3]u64{ 0, 11676570643941818368, 21600093027 },
[3]u64{ 0, 17840016768744030208, 99632988162 },
[3]u64{ 0, 16463817321652158464, 2967109246 },
[3]u64{ 0, 6954191143357644800, 126892505325 },
[3]u64{ 0, 5080060379673919488, 237376987457 },
[3]u64{ 0, 0, 65275390625 },
[3]u64{ 0, 0, 161000000000 },
[3]u64{ 14106411361315920281, 2672, 0 },
[3]u64{ 3609034283485221502, 2672764710092, 0 },
[3]u64{ 9896072247338192335, 16433563478020213436, 144 },
[3]u64{ 8889095178479228297, 4194750497955655375, 144890865261 },
[3]u64{ 3631796911038383102, 2691539602252904735, 109227397880 },
[3]u64{ 898318840772166823, 3775467271962795241, 248145908654 },
[3]u64{ 17293677953982795024, 16980212613224918121, 174204668490 },
[3]u64{ 7353628266884669440, 4172857038337333440, 74920499170 },
[3]u64{ 2404693032470315008, 5936867627376461659, 226226211033 },
[3]u64{ 9191155893041889280, 17856837443266866062, 217321838238 },
[3]u64{ 6353946855033798656, 8956297047799810807, 158968021097 },
[3]u64{ 3767824038248841216, 15356974049716912789, 105485521835 },
[3]u64{ 7205759403792793600, 6923608913322982854, 171832503231 },
[3]u64{ 0, 4855902993563955944, 191375329591 },
[3]u64{ 0, 13835893222288330752, 55263239028 },
[3]u64{ 0, 9114973913760137216, 116750045274 },
[3]u64{ 0, 17937099003422310400, 90494123725 },
[3]u64{ 0, 7007960010734960640, 205972372085 },
[3]u64{ 0, 7683422439270776832, 117379902273 },
[3]u64{ 0, 720575940379279360, 65416519165 },
[3]u64{ 0, 0, 253039062500 },
[3]u64{ 0, 0, 228000000000 },
[3]u64{ 17063068157692817751, 40783152, 0 },
[3]u64{ 5385330256507239985, 40783152924990778, 0 },
[3]u64{ 3373050282752075748, 2768933352715741194, 2210859 },
[3]u64{ 4116064001262906061, 15201941611824153390, 43150104177 },
[3]u64{ 11306582046748043076, 1418128541727000180, 113824098906 },
[3]u64{ 17035410946089626406, 5353350204565757408, 90076876902 },
[3]u64{ 15618595715183448558, 1721001680354286741, 102290205696 },
[3]u64{ 5141740092277295680, 637631411660453962, 93295688 },
[3]u64{ 16973644291514990592, 1630012588870568400, 72034566068 },
[3]u64{ 14625255268443750400, 9253063571656828156, 180088363159 },
[3]u64{ 14021170507320131584, 6029146854993203780, 151501609581 },
[3]u64{ 4451355232865091584, 16987401965352759896, 109326840705 },
[3]u64{ 12891553933348044800, 14499131620542087970, 129920888905 },
[3]u64{ 1152921504606846976, 1978417255298660539, 73785999500 },
[3]u64{ 0, 5790079354402454176, 140107250214 },
[3]u64{ 0, 13748918935842078720, 38313880830 },
[3]u64{ 0, 18047438014740692992, 254745330388 },
[3]u64{ 0, 3116889656839372800, 212978353575 },
[3]u64{ 0, 15995952446606147584, 167168966926 },
[3]u64{ 0, 12530140063251562496, 14867142319 },
[3]u64{ 0, 16717361816799281152, 175679260253 },
[3]u64{ 0, 0, 93906250000 },
[3]u64{ 0, 0, 16000000000 },
[3]u64{ 5562205901560339855, 622, 0 },
[3]u64{ 2106077949367544134, 622301527786, 0 },
[3]u64{ 7496855998374373623, 13558973353698967386, 33 },
[3]u64{ 229183437194837004, 6228991722850501890, 33735033418 },
[3]u64{ 465169186276472889, 16886831391703377787, 74337674317 },
[3]u64{ 2152980561625316473, 1181713637872883048, 77915436964 },
[3]u64{ 2059790725449340402, 12393932434925221726, 164064060824 },
[3]u64{ 17891190926410198930, 10684799845419711910, 152671876423 },
[3]u64{ 9930696175609809814, 4590318792215640843, 71579224160 },
[3]u64{ 7276914261609005312, 6383712187366189238, 96248841680 },
[3]u64{ 10539762974036983808, 1904270214927675016, 208346061731 },
[3]u64{ 12851089458992250880, 3711506775113308575, 163103230695 },
[3]u64{ 9449311677678878720, 8091219444738793995, 231201201185 },
[3]u64{ 8699564697382289408, 39436684991068052, 33438625885 },
[3]u64{ 4224376450473525248, 18025182908196512891, 93002137866 },
[3]u64{ 4611686018427387904, 7853924592034603138, 10977147123 },
[3]u64{ 0, 4815749283615688320, 243425762105 },
[3]u64{ 0, 14242399906544287744, 57261062291 },
[3]u64{ 0, 76242322576113664, 147772082046 },
[3]u64{ 0, 10858088421377703936, 126004133104 },
[3]u64{ 0, 14293835879041466368, 240588618152 },
[3]u64{ 0, 12182236992037191680, 168774870395 },
[3]u64{ 0, 11529215046068469760, 123660400390 },
[3]u64{ 0, 0, 6625000000 },
[3]u64{ 0, 0, 64000000000 },
[3]u64{ 13756840147955779925, 9495567, 0 },
[3]u64{ 13788447602092505948, 9495567745759798, 0 },
[3]u64{ 4972540435632173670, 14000097438505379162, 514755 },
[3]u64{ 2844874687533091959, 16451062686452429925, 195758946802 },
[3]u64{ 15377573779532804095, 4009347599785716645, 242891813895 },
[3]u64{ 17824715805091194381, 16544162347546196456, 7217347168 },
[3]u64{ 18277569135638159711, 17674258299745817187, 96896860837 },
[3]u64{ 4254645803379752845, 5215238411201214416, 165958123462 },
[3]u64{ 2933643244178200621, 14253990228345322571, 198282718640 },
[3]u64{ 17188148801879487562, 11214836553940194590, 176772710358 },
[3]u64{ 11069762501163246592, 14620711348380590101, 214607957507 },
[3]u64{ 11676570643941818368, 6638710787931587427, 3792590350 },
[3]u64{ 17840016768744030208, 17320000343692853250, 14359885232 },
[3]u64{ 16463817321652158464, 75147386268843646, 176938919100 },
[3]u64{ 6954191143357644800, 17938801582125480173, 188004073747 },
[3]u64{ 5080060379673919488, 6573358613626446145, 19972464382 },
[3]u64{ 0, 8688505427903736481, 254356342484 },
[3]u64{ 0, 539870168696556032, 212471004823 },
[3]u64{ 0, 9002861336394465280, 151029266420 },
[3]u64{ 0, 17989846818158018560, 244488046090 },
[3]u64{ 0, 2700938287723315200, 10975231550 },
[3]u64{ 0, 17800090499088908288, 62146418157 },
[3]u64{ 0, 8809040871136690176, 237964944839 },
[3]u64{ 0, 9223372036854775808, 199477539062 },
[3]u64{ 0, 0, 246500000000 },
[3]u64{ 16433563478020213436, 144, 0 },
[3]u64{ 4194750497955655375, 144890865261, 0 },
[3]u64{ 2691539602252904735, 15763656745260536568, 7 },
[3]u64{ 3775467271962795241, 8787336846248645550, 7854549544 },
[3]u64{ 16980212613224918121, 17584084447880694346, 40476362484 },
[3]u64{ 4172857038337333440, 18041672551129683938, 244953235127 },
[3]u64{ 5936867627376461659, 14025886302294509785, 183978041028 },
[3]u64{ 17856837443266866062, 18430498103283160734, 196760344819 },
[3]u64{ 8956297047799810807, 3292348826238025833, 243999119304 },
[3]u64{ 15356974049716912789, 9211721212658275243, 200178478587 },
[3]u64{ 6923608913322982854, 10233245872666307519, 251499368407 },
[3]u64{ 4855902993563955944, 6200995035623311671, 215554745370 },
[3]u64{ 13835893222288330752, 8480542380570450804, 26336156614 },
[3]u64{ 9114973913760137216, 11870363864499900506, 198459731123 },
[3]u64{ 17937099003422310400, 9301051379839581901, 179643493714 },
[3]u64{ 7007960010734960640, 11456694803569638005, 82504211005 },
[3]u64{ 7683422439270776832, 14327208890643983169, 61621068669 },
[3]u64{ 720575940379279360, 4510081789599866365, 125776679550 },
[3]u64{ 0, 13255356976020303332, 126244492023 },
[3]u64{ 0, 9658806854127314944, 247718574341 },
[3]u64{ 0, 13708435528809971712, 5523604968 },
[3]u64{ 0, 1580190652103131136, 232743135779 },
[3]u64{ 0, 16557336970347413504, 35085662306 },
[3]u64{ 0, 12751520132434493440, 98897575035 },
[3]u64{ 0, 9295429630892703744, 123691261291 },
[3]u64{ 0, 0, 107503906250 },
[3]u64{ 0, 0, 202000000000 },
[3]u64{ 2768933352715741194, 2210859, 0 },
[3]u64{ 15201941611824153390, 2210859150104177, 0 },
[3]u64{ 1418128541727000180, 16872870088062921306, 119850 },
[3]u64{ 5353350204565757408, 5112979788807802982, 42914680120 },
[3]u64{ 1721001680354286741, 13742728082020150272, 56277175189 },
[3]u64{ 637631411660453962, 2217110934613627976, 149744994782 },
[3]u64{ 1630012588870568400, 11021433940188610484, 222120189824 },
[3]u64{ 9253063571656828156, 1713669895470733463, 128597473131 },
[3]u64{ 6029146854993203780, 3313382510572018285, 107092898231 },
[3]u64{ 16987401965352759896, 14976595232784069505, 183179618825 },
[3]u64{ 14499131620542087970, 7213172372862496841, 9811882854 },
[3]u64{ 1978417255298660539, 15836474542502248588, 102391026857 },
[3]u64{ 5790079354402454176, 3221099285878340134, 169858497005 },
[3]u64{ 13748918935842078720, 3265814602578095358, 237174616142 },
[3]u64{ 18047438014740692992, 6502528252282225364, 78177040164 },
[3]u64{ 3116889656839372800, 16392476834556790183, 36352502762 },
[3]u64{ 15995952446606147584, 15167629413417091342, 234888637949 },
[3]u64{ 12530140063251562496, 1366763272626280111, 253822238838 },
[3]u64{ 16717361816799281152, 8720523635169216093, 118074092385 },
[3]u64{ 0, 9649171375767398672, 97472740533 },
[3]u64{ 0, 7647980704001073152, 181523082628 },
[3]u64{ 0, 13286434495608651776, 132414597864 },
[3]u64{ 0, 4358271637167013888, 232720259057 },
[3]u64{ 0, 15954987941890097152, 241236262378 },
[3]u64{ 0, 7911135695429697536, 234864921629 },
[3]u64{ 0, 7205759403792793600, 29428863525 },
[3]u64{ 0, 0, 37390625000 },
[3]u64{ 0, 0, 232000000000 },
[3]u64{ 13558973353698967386, 33, 0 },
[3]u64{ 6228991722850501890, 33735033418, 0 },
[3]u64{ 16886831391703377787, 15288289344628122701, 1 },
[3]u64{ 1181713637872883048, 952589339068938148, 1828779826 },
[3]u64{ 12393932434925221726, 10058155040190817688, 50051639971 },
[3]u64{ 10684799845419711910, 5322725640026584391, 163545253677 },
[3]u64{ 4590318792215640843, 2269982385930389600, 45288545535 },
[3]u64{ 6383712187366189238, 13216683679976310224, 255123055991 },
[3]u64{ 1904270214927675016, 17417440642083494819, 119716477857 },
[3]u64{ 3711506775113308575, 3029180749090900711, 161944201349 },
[3]u64{ 8091219444738793995, 8315443826261908513, 133164212217 },
[3]u64{ 39436684991068052, 1488962797247197277, 249450781113 },
[3]u64{ 18025182908196512891, 18009099634999034122, 185080716834 },
[3]u64{ 7853924592034603138, 8092455412807497971, 34976275247 },
[3]u64{ 4815749283615688320, 17808458047236758329, 47438692886 },
[3]u64{ 14242399906544287744, 3164591817527425171, 22965398445 },
[3]u64{ 76242322576113664, 3314036340472350590, 173171552866 },
[3]u64{ 10858088421377703936, 33234902404332784, 98179654270 },
[3]u64{ 14293835879041466368, 12349284717857274280, 126001801667 },
[3]u64{ 12182236992037191680, 18209607903013119355, 195669456065 },
[3]u64{ 11529215046068469760, 7891549145984268038, 193987144822 },
[3]u64{ 0, 7703609897518594624, 118427801736 },
[3]u64{ 0, 6336912652634587136, 136417613529 },
[3]u64{ 0, 4461621834659397632, 217343524723 },
[3]u64{ 0, 5484660635557953536, 115241865004 },
[3]u64{ 0, 15142619273265938432, 44297324048 },
[3]u64{ 0, 12170977992968765440, 16820883035 },
[3]u64{ 0, 1152921504606846976, 91659790039 },
[3]u64{ 0, 0, 215062500000 },
[3]u64{ 0, 0, 160000000000 },
[3]u64{ 14000097438505379162, 514755, 0 },
[3]u64{ 16451062686452429925, 514755758946802, 0 },
[3]u64{ 4009347599785716645, 17812314011563521031, 27904 },
[3]u64{ 16544162347546196456, 7684138864490314336, 965607477 },
[3]u64{ 17674258299745817187, 9740522787420029605, 53416558002 },
[3]u64{ 5215238411201214416, 6701109407732989894, 178528034798 },
[3]u64{ 14253990228345322571, 16534886227502443952, 238363267868 },
[3]u64{ 11214836553940194590, 8908667306968317910, 28896357978 },
[3]u64{ 14620711348380590101, 7531472173477105155, 90482939822 },
[3]u64{ 6638710787931587427, 11527371604834801166, 174408281924 },
[3]u64{ 17320000343692853250, 15688593496691078576, 68624900066 },
[3]u64{ 75147386268843646, 11394944804253312188, 226850480357 },
[3]u64{ 17938801582125480173, 11182279880854372627, 229617721195 },
[3]u64{ 6573358613626446145, 150579373068361470, 107606192607 },
[3]u64{ 8688505427903736481, 3147220002440857300, 223008162924 },
[3]u64{ 539870168696556032, 3630514817795505815, 108170611138 },
[3]u64{ 9002861336394465280, 11708796588334233588, 194196810602 },
[3]u64{ 17989846818158018560, 16844495466426369546, 106634735134 },
[3]u64{ 2700938287723315200, 17636655472325475902, 30913141928 },
[3]u64{ 17800090499088908288, 17038926655686645229, 168956085008 },
[3]u64{ 8809040871136690176, 15602838456783529415, 16923682064 },
[3]u64{ 9223372036854775808, 10869815869248876790, 16845831567 },
[3]u64{ 0, 18407124180939800832, 143589253898 },
[3]u64{ 0, 5705018517251293184, 10997852201 },
[3]u64{ 0, 9660452258743058432, 41309269673 },
[3]u64{ 0, 5646292272224927744, 169523694166 },
[3]u64{ 0, 7410409304047484928, 86306086117 },
[3]u64{ 0, 5953758707383795712, 229401719093 },
[3]u64{ 0, 4611686018427387904, 53322753906 },
[3]u64{ 0, 0, 114250000000 },
[3]u64{ 0, 0, 128000000000 },
[3]u64{ 15763656745260536568, 7, 0 },
[3]u64{ 8787336846248645550, 7854549544, 0 },
[3]u64{ 17584084447880694346, 7854549544476362484, 0 },
[3]u64{ 18041672551129683938, 15035424419724983, 425795984 },
[3]u64{ 14025886302294509785, 18280822466032836292, 144000815071 },
[3]u64{ 18430498103283160734, 11524250747302615283, 223991005371 },
[3]u64{ 3292348826238025833, 15212285943691810760, 187624730884 },
[3]u64{ 9211721212658275243, 7951804027551297019, 4824659673 },
[3]u64{ 10233245872666307519, 1706416229965221847, 217431068160 },
[3]u64{ 6200995035623311671, 3406023111930700826, 92505009 },
[3]u64{ 8480542380570450804, 16132696204133391302, 177184640882 },
[3]u64{ 11870363864499900506, 11593846688794356915, 114874555213 },
[3]u64{ 9301051379839581901, 6875759884161133906, 77628503688 },
[3]u64{ 11456694803569638005, 3593593325323835965, 136372735690 },
[3]u64{ 14327208890643983169, 9542049733257388925, 202194809084 },
[3]u64{ 4510081789599866365, 9926551925937787518, 252517275552 },
[3]u64{ 13255356976020303332, 3128491553219547895, 160538119458 },
[3]u64{ 9658806854127314944, 17158408656931354885, 34169595866 },
[3]u64{ 13708435528809971712, 2065169543154992616, 218930159197 },
[3]u64{ 1580190652103131136, 4832622393556232739, 93111953065 },
[3]u64{ 16557336970347413504, 16505930714733656162, 169261976984 },
[3]u64{ 12751520132434493440, 18270988073492888699, 152894788296 },
[3]u64{ 9295429630892703744, 2525111411519708523, 200990472248 },
[3]u64{ 0, 16728989342518570442, 56136886563 },
[3]u64{ 0, 7974052022039438336, 35906880329 },
[3]u64{ 0, 5356554962386550784, 73432274226 },
[3]u64{ 0, 6693869495028547584, 50290379426 },
[3]u64{ 0, 8157517147199766528, 162362875392 },
[3]u64{ 0, 12065776720423157760, 442219890 },
[3]u64{ 0, 11997589407315001344, 114654087066 },
[3]u64{ 0, 0, 154650390625 },
[3]u64{ 0, 0, 97000000000 },
[3]u64{ 16872870088062921306, 119850, 0 },
[3]u64{ 5112979788807802982, 119850914680120, 0 },
[3]u64{ 13742728082020150272, 2418433229320326037, 6497 },
[3]u64{ 2217110934613627976, 1143911773589293534, 97131103528 },
[3]u64{ 11021433940188610484, 9276183703610924928, 40062011581 },
[3]u64{ 1713669895470733463, 3532180128827684715, 189502862926 },
[3]u64{ 3313382510572018285, 8563997501322031543, 78191479868 },
[3]u64{ 14976595232784069505, 14843890409658460681, 60464255234 },
[3]u64{ 7213172372862496841, 9489417861634552678, 2804688911 },
[3]u64{ 15836474542502248588, 1113198223322322089, 15514422373 },
[3]u64{ 3221099285878340134, 11190777557146597869, 101060346596 },
[3]u64{ 3265814602578095358, 17764553645932638286, 228606653266 },
[3]u64{ 6502528252282225364, 14900777150991234852, 82963018382 },
[3]u64{ 16392476834556790183, 17364899863357893610, 142807772747 },
[3]u64{ 15167629413417091342, 15537570181590167037, 75941353107 },
[3]u64{ 1366763272626280111, 5558052627121307766, 147842293367 },
[3]u64{ 8720523635169216093, 12095241565795232609, 119301302636 },
[3]u64{ 9649171375767398672, 2187936505958366389, 108655684359 },
[3]u64{ 7647980704001073152, 12009203621325860228, 7118608275 },
[3]u64{ 13286434495608651776, 14814842834750302952, 147651020232 },
[3]u64{ 4358271637167013888, 5965296499605198833, 200803114239 },
[3]u64{ 15954987941890097152, 4051026394962148842, 255323379371 },
[3]u64{ 7911135695429697536, 16799526299141688349, 171219606580 },
[3]u64{ 7205759403792793600, 9460214166646215205, 52910704145 },
[3]u64{ 0, 10750736995029068008, 17512839237 },
[3]u64{ 0, 5377963045376430080, 69582798620 },
[3]u64{ 0, 15996910350253424640, 28291539960 },
[3]u64{ 0, 13651157529655246848, 248867194247 },
[3]u64{ 0, 9771305410219737088, 135740030732 },
[3]u64{ 0, 12709439623416250368, 12529703527 },
[3]u64{ 0, 9943947977234055168, 103688980102 },
[3]u64{ 0, 0, 134539062500 },
[3]u64{ 0, 0, 228000000000 },
[3]u64{ 952589339068938148, 1828779826, 0 },
[3]u64{ 10058155040190817688, 1828779826051639971, 0 },
[3]u64{ 5322725640026584391, 371564423966525229, 99138353 },
[3]u64{ 2269982385930389600, 14464859121514339583, 49020142547 },
[3]u64{ 13216683679976310224, 3913119023023056247, 211784141584 },
[3]u64{ 17417440642083494819, 5493396321716566945, 16212130607 },
[3]u64{ 3029180749090900711, 5837454566818211973, 47297797611 },
[3]u64{ 8315443826261908513, 2886670683193253881, 235316449046 },
[3]u64{ 1488962797247197277, 5504823105587173817, 22156486731 },
[3]u64{ 18009099634999034122, 9431834277334851106, 75298417058 },
[3]u64{ 8092455412807497971, 12921661346456247087, 162511300760 },
[3]u64{ 17808458047236758329, 3643076516404724246, 152700484665 },
[3]u64{ 3164591817527425171, 12559396953196866477, 57197491573 },
[3]u64{ 3314036340472350590, 1626880974916825698, 117680846273 },
[3]u64{ 33234902404332784, 6806994170946429566, 193088193394 },
[3]u64{ 12349284717857274280, 7596631230206896579, 114369007893 },
[3]u64{ 18209607903013119355, 3100480253729502401, 21411814204 },
[3]u64{ 7891549145984268038, 6310570748781063286, 60168077371 },
[3]u64{ 7703609897518594624, 14251867077375744136, 59342096725 },
[3]u64{ 6336912652634587136, 6701165793751570137, 85772595262 },
[3]u64{ 4461621834659397632, 10856833140463959923, 62363270925 },
[3]u64{ 5484660635557953536, 15867563727561248556, 13588550103 },
[3]u64{ 15142619273265938432, 5048961008671491600, 215860182353 },
[3]u64{ 12170977992968765440, 13278183119599849051, 81273704724 },
[3]u64{ 1152921504606846976, 4547591784941053655, 20719811749 },
[3]u64{ 0, 11815437715887182496, 165246525444 },
[3]u64{ 0, 398495392178782208, 4640516162 },
[3]u64{ 0, 9154841240825495552, 66021602478 },
[3]u64{ 0, 1902683298245640192, 174496284938 },
[3]u64{ 0, 5081900962138816512, 10103144668 },
[3]u64{ 0, 3234710432358858752, 220275490403 },
[3]u64{ 0, 16717361816799281152, 99175354003 },
[3]u64{ 0, 0, 147906250000 },
[3]u64{ 0, 0, 16000000000 },
[3]u64{ 17812314011563521031, 27904, 0 },
[3]u64{ 7684138864490314336, 27904965607477, 0 },
[3]u64{ 9740522787420029605, 13488568028574514610, 1512 },
[3]u64{ 6701109407732989894, 275784718433886190, 232731216738 },
[3]u64{ 16534886227502443952, 10020568880357102364, 98014950319 },
[3]u64{ 8908667306968317910, 8876397213146246746, 175543216127 },
[3]u64{ 7531472173477105155, 2155905919114811310, 255481190457 },
[3]u64{ 11527371604834801166, 1087100407155601220, 57116871894 },
[3]u64{ 15688593496691078576, 2903498381705011170, 214058931831 },
[3]u64{ 11394944804253312188, 12223476257006657765, 119157398962 },
[3]u64{ 11182279880854372627, 12148657163736735595, 178662635975 },
[3]u64{ 150579373068361470, 8951241323311673823, 199658580024 },
[3]u64{ 3147220002440857300, 8463862715901576300, 56485247764 },
[3]u64{ 3630514817795505815, 3873401978748963266, 20458826917 },
[3]u64{ 11708796588334233588, 248364795947002730, 165209977542 },
[3]u64{ 16844495466426369546, 10454378025404001822, 198013463882 },
[3]u64{ 17636655472325475902, 6574176865628265640, 74566732968 },
[3]u64{ 17038926655686645229, 16703315293848336, 168356386842 },
[3]u64{ 15602838456783529415, 9896033222450013456, 26000905488 },
[3]u64{ 10869815869248876790, 17311376269334085007, 16536465035 },
[3]u64{ 18407124180939800832, 18378511316495639306, 139938451587 },
[3]u64{ 5705018517251293184, 15120796393727584297, 131996301094 },
[3]u64{ 9660452258743058432, 18253447805740347049, 38819700014 },
[3]u64{ 5646292272224927744, 5842497225601731158, 46989521388 },
[3]u64{ 7410409304047484928, 4369968404176723173, 236316722409 },
[3]u64{ 5953758707383795712, 16142207253674488117, 233236896461 },
[3]u64{ 4611686018427387904, 12124259227391928178, 205875070808 },
[3]u64{ 0, 13019483264566077056, 88657257409 },
[3]u64{ 0, 74901376448135168, 193705787602 },
[3]u64{ 0, 13897060093813325824, 210004060411 },
[3]u64{ 0, 4495486210810052608, 251753361137 },
[3]u64{ 0, 14885496280087265280, 241243700795 },
[3]u64{ 0, 4976477588244398080, 59806944370 },
[3]u64{ 0, 11529215046068469760, 114269775390 },
[3]u64{ 0, 0, 30625000000 },
[3]u64{ 0, 0, 64000000000 },
[3]u64{ 15035424419724983, 425795984, 0 },
[3]u64{ 18280822466032836292, 425795984000815071, 0 },
[3]u64{ 11524250747302615283, 10043594327130472635, 23082446 },
[3]u64{ 15212285943691810760, 8336034337032909060, 206544464339 },
[3]u64{ 7951804027551297019, 16717215784895280857, 211451897326 },
[3]u64{ 1706416229965221847, 10968831263951212032, 238906242083 },
[3]u64{ 3406023111930700826, 5536629379734406065, 35594621534 },
[3]u64{ 16132696204133391302, 1618806894932332402, 94300141280 },
[3]u64{ 11593846688794356915, 11363331325254998861, 224087755697 },
[3]u64{ 6875759884161133906, 8775167772751754888, 177616007425 },
[3]u64{ 3593593325323835965, 2898202945316114122, 1475702798 },
[3]u64{ 9542049733257388925, 8868842714495185148, 14157111896 },
[3]u64{ 9926551925937787518, 17052094667531999136, 88480780926 },
[3]u64{ 3128491553219547895, 3658615537031138594, 126924395904 },
[3]u64{ 17158408656931354885, 12486952437987190746, 128198333945 },
[3]u64{ 2065169543154992616, 912079238520577629, 249676919048 },
[3]u64{ 4832622393556232739, 10960072898031888041, 8049443914 },
[3]u64{ 16505930714733656162, 6129550094334741912, 74594146742 },
[3]u64{ 18270988073492888699, 7965724516573729480, 182332283576 },
[3]u64{ 2525111411519708523, 5801761178810791992, 184431822791 },
[3]u64{ 16728989342518570442, 13197466483098446115, 199314514103 },
[3]u64{ 7974052022039438336, 11326268638393107273, 183715436091 },
[3]u64{ 5356554962386550784, 3597339351794947378, 59613998253 },
[3]u64{ 6693869495028547584, 353880726151383714, 173195012157 },
[3]u64{ 8157517147199766528, 11154818162602073600, 61019183912 },
[3]u64{ 12065776720423157760, 5141043976157511026, 40604703904 },
[3]u64{ 11997589407315001344, 7188225141808859034, 160278696552 },
[3]u64{ 0, 13894168943295705185, 104389674465 },
[3]u64{ 0, 12176538069834828288, 225753204407 },
[3]u64{ 0, 7994239409235165184, 183660091451 },
[3]u64{ 0, 13707777025480065024, 59433368586 },
[3]u64{ 0, 10120227247676719104, 10743100081 },
[3]u64{ 0, 7358494763030413312, 177548618618 },
[3]u64{ 0, 7656119366529843200, 122398904800 },
[3]u64{ 0, 9223372036854775808, 224415039062 },
[3]u64{ 0, 0, 86500000000 },
[3]u64{ 2418433229320326037, 6497, 0 },
[3]u64{ 1143911773589293534, 6497131103528, 0 },
[3]u64{ 9276183703610924928, 3877189582299842749, 352 },
[3]u64{ 3532180128827684715, 7625565791857948238, 96210182868 },
[3]u64{ 8563997501322031543, 16568435163612007484, 212413382749 },
[3]u64{ 14843890409658460681, 17592071940521808130, 93898176669 },
[3]u64{ 9489417861634552678, 15158637878035490831, 157953668130 },
[3]u64{ 1113198223322322089, 17789243229146401893, 34821751405 },
[3]u64{ 11190777557146597869, 14677686051252896484, 109964356807 },
[3]u64{ 17764553645932638286, 3531237481269211986, 199795678955 },
[3]u64{ 14900777150991234852, 8074435404989280910, 235191428767 },
[3]u64{ 17364899863357893610, 7086549341467684427, 159437716020 },
[3]u64{ 15537570181590167037, 10556134770918626963, 52384162609 },
[3]u64{ 5558052627121307766, 10772666134712966775, 49572249212 },
[3]u64{ 12095241565795232609, 6195173298198112620, 124583987401 },
[3]u64{ 2187936505958366389, 8144773843324250887, 201335841017 },
[3]u64{ 12009203621325860228, 14144284817150924691, 249441529074 },
[3]u64{ 14814842834750302952, 6464447844648863176, 242766763216 },
[3]u64{ 5965296499605198833, 15760468443293179135, 208350438419 },
[3]u64{ 4051026394962148842, 5172191224908322475, 19854376706 },
[3]u64{ 16799526299141688349, 2357554307308969012, 2280385048 },
[3]u64{ 9460214166646215205, 1602046917604361745, 24127803275 },
[3]u64{ 10750736995029068008, 7830970218109515845, 139086847137 },
[3]u64{ 5377963045376430080, 2899479134887821084, 161424517746 },
[3]u64{ 15996910350253424640, 15792042302392017912, 114157181078 },
[3]u64{ 13651157529655246848, 11286099112296056199, 150856088328 },
[3]u64{ 9771305410219737088, 15161477829153947404, 8611820658 },
[3]u64{ 12709439623416250368, 423831848142641767, 114821905360 },
[3]u64{ 9943947977234055168, 9707413321046312582, 208022975970 },
[3]u64{ 0, 10969483299803835620, 226526239930 },
[3]u64{ 0, 4326479556120930304, 186594656881 },
[3]u64{ 0, 12876227232041795584, 113234538926 },
[3]u64{ 0, 16967986827791171584, 174698021676 },
[3]u64{ 0, 1288146316538413056, 44919836409 },
[3]u64{ 0, 13715290452691779584, 249069830551 },
[3]u64{ 0, 4683743612465315840, 151743507385 },
[3]u64{ 0, 0, 185253906250 },
[3]u64{ 0, 0, 74000000000 },
[3]u64{ 371564423966525229, 99138353, 0 },
[3]u64{ 14464859121514339583, 99138353020142547, 0 },
[3]u64{ 3913119023023056247, 16344805304534272784, 5374300 },
[3]u64{ 5493396321716566945, 26429987091348271, 92886053671 },
[3]u64{ 5837454566818211973, 8691371289609838059, 39001432772 },
[3]u64{ 2886670683193253881, 12980168378493046550, 196471160181 },
[3]u64{ 5504823105587173817, 14010125458129496139, 117703656337 },
[3]u64{ 9431834277334851106, 17061829677031795106, 145759490422 },
[3]u64{ 12921661346456247087, 2227928323072698520, 118924923640 },
[3]u64{ 3643076516404724246, 7394752319272287289, 248120776236 },
[3]u64{ 12559396953196866477, 8805771303577744757, 44400870326 },
[3]u64{ 1626880974916825698, 16371027194302248385, 182477361818 },
[3]u64{ 6806994170946429566, 9114324123731231602, 154887475162 },
[3]u64{ 7596631230206896579, 14468189808746991893, 218494088500 },
[3]u64{ 3100480253729502401, 2376054557800684348, 52784322141 },
[3]u64{ 6310570748781063286, 12462238943546048571, 93128806175 },
[3]u64{ 14251867077375744136, 15334855370842605909, 31675579326 },
[3]u64{ 6701165793751570137, 7211347914013798462, 190831304175 },
[3]u64{ 10856833140463959923, 13763642332572548877, 239390927953 },
[3]u64{ 15867563727561248556, 16868268377740071383, 81746128545 },
[3]u64{ 5048961008671491600, 1120013377627684177, 161914430661 },
[3]u64{ 13278183119599849051, 15898107650717274388, 197060716046 },
[3]u64{ 4547591784941053655, 12281923376333274277, 14861838142 },
[3]u64{ 11815437715887182496, 6383530489286615044, 62665804400 },
[3]u64{ 398495392178782208, 4253822060257126466, 112346051881 },
[3]u64{ 9154841240825495552, 17614372438391501998, 41230600155 },
[3]u64{ 1902683298245640192, 4309951310554333450, 219954877043 },
[3]u64{ 5081900962138816512, 13106185988973773020, 115233642928 },
[3]u64{ 3234710432358858752, 2070134359761960547, 176710487766 },
[3]u64{ 16717361816799281152, 9399359914137865875, 214112222208 },
[3]u64{ 0, 17415053284723541264, 509540321 },
[3]u64{ 0, 4840502610448261120, 225944071930 },
[3]u64{ 0, 5690599259712258048, 250262404172 },
[3]u64{ 0, 114769594245185536, 76308488004 },
[3]u64{ 0, 3150620882578178048, 68006221672 },
[3]u64{ 0, 5136918324969472000, 104170795500 },
[3]u64{ 0, 7205759403792793600, 236278472900 },
[3]u64{ 0, 0, 196390625000 },
[3]u64{ 0, 0, 232000000000 },
[3]u64{ 13488568028574514610, 1512, 0 },
[3]u64{ 275784718433886190, 1512731216738, 0 },
[3]u64{ 10020568880357102364, 98202693831717807, 82 },
[3]u64{ 8876397213146246746, 12909287260170414079, 82005323578 },
[3]u64{ 2155905919114811310, 11728631949380786233, 58699813864 },
[3]u64{ 1087100407155601220, 18263701925522197718, 232635810411 },
[3]u64{ 2903498381705011170, 4868886449713321591, 107990077265 },
[3]u64{ 12223476257006657765, 5870139507184082354, 81263942863 },
[3]u64{ 12148657163736735595, 5978562500822661575, 207318220900 },
[3]u64{ 8951241323311673823, 10821136839630268472, 100324098522 },
[3]u64{ 8463862715901576300, 9490907630136752916, 218586615003 },
[3]u64{ 3873401978748963266, 10564005678001613989, 219514503133 },
[3]u64{ 248364795947002730, 5754050547468481222, 221572675895 },
[3]u64{ 10454378025404001822, 3833909949855542602, 55311927705 },
[3]u64{ 6574176865628265640, 15446538552665967784, 153207836674 },
[3]u64{ 16703315293848336, 14924837848804399130, 2837358532 },
[3]u64{ 9896033222450013456, 18140170340418344208, 196809077080 },
[3]u64{ 17311376269334085007, 11380424819825208971, 88983380604 },
[3]u64{ 18378511316495639306, 12416915664152252547, 124616934065 },
[3]u64{ 15120796393727584297, 17195282241626289958, 177673122346 },
[3]u64{ 18253447805740347049, 2649541045825281326, 42932158118 },
[3]u64{ 5842497225601731158, 16577429864268509676, 166143631907 },
[3]u64{ 4369968404176723173, 12051257060168107241, 35898664273 },
[3]u64{ 16142207253674488117, 5363884561143470797, 81653299954 },
[3]u64{ 12124259227391928178, 13054029903083620184, 242290776764 },
[3]u64{ 13019483264566077056, 566314952158634945, 188707660379 },
[3]u64{ 74901376448135168, 1329472079642345682, 91030699995 },
[3]u64{ 13897060093813325824, 15686237486658857211, 219072070825 },
[3]u64{ 4495486210810052608, 1069073549290598129, 169850352638 },
[3]u64{ 14885496280087265280, 4323599065125928507, 254057954593 },
[3]u64{ 4976477588244398080, 17861823329752681586, 33234382774 },
[3]u64{ 11529215046068469760, 17220149985412802078, 182968291382 },
[3]u64{ 0, 4344934572159429184, 54933506201 },
[3]u64{ 0, 2252927464837120000, 153235539375 },
[3]u64{ 0, 10910018171964489728, 175122131442 },
[3]u64{ 0, 3597328585515335680, 242591433270 },
[3]u64{ 0, 6972808074239148032, 54195011573 },
[3]u64{ 0, 2227030015734710272, 245377996683 },
[3]u64{ 0, 1152921504606846976, 139120727539 },
[3]u64{ 0, 0, 243062500000 },
[3]u64{ 0, 0, 160000000000 },
[3]u64{ 10043594327130472635, 23082446, 0 },
[3]u64{ 8336034337032909060, 23082446544464339, 0 },
[3]u64{ 16717215784895280857, 17238287503805244910, 1251301 },
[3]u64{ 10968831263951212032, 1434575446038410275, 229934489438 },
[3]u64{ 5536629379734406065, 14009569747841241694, 94077768490 },
[3]u64{ 1618806894932332402, 14938795732275951328, 42759460297 },
[3]u64{ 11363331325254998861, 6687653542888983473, 201809833739 },
[3]u64{ 8775167772751754888, 28238723295162625, 11362538425 },
[3]u64{ 2898202945316114122, 4745270274832691214, 185001530824 },
[3]u64{ 8868842714495185148, 926478968112308824, 200257241617 },
[3]u64{ 17052094667531999136, 9213681606604198526, 17050224525 },
[3]u64{ 3658615537031138594, 13346223820579313024, 141499474680 },
[3]u64{ 12486952437987190746, 691642518601291257, 248723500243 },
[3]u64{ 912079238520577629, 1153720150033789192, 211037494016 },
[3]u64{ 10960072898031888041, 12089015034721780810, 62543294 },
[3]u64{ 6129550094334741912, 3555868702841788854, 190655346818 },
[3]u64{ 7965724516573729480, 11708406782758214328, 130192764028 },
[3]u64{ 5801761178810791992, 9417497762905343943, 124634714003 },
[3]u64{ 13197466483098446115, 12838336066957615287, 147510523576 },
[3]u64{ 11326268638393107273, 13737708142128207419, 184695967592 },
[3]u64{ 3597339351794947378, 11683434809834695853, 104744722650 },
[3]u64{ 353880726151383714, 2689114340106315837, 218633360270 },
[3]u64{ 11154818162602073600, 8859225263374261032, 142145777180 },
[3]u64{ 5141043976157511026, 15761671984578600096, 28480259563 },
[3]u64{ 7188225141808859034, 7087267079878005352, 235854441950 },
[3]u64{ 13894168943295705185, 4601291730423121377, 222384201518 },
[3]u64{ 12176538069834828288, 9559411037059581623, 46249436524 },
[3]u64{ 7994239409235165184, 12969820289641388091, 108518216710 },
[3]u64{ 13707777025480065024, 13628239920285957130, 6703095366 },
[3]u64{ 10120227247676719104, 8049893933765800625, 70738788366 },
[3]u64{ 7358494763030413312, 10391755948840250234, 14436385624 },
[3]u64{ 7656119366529843200, 14454650777462444512, 88563338218 },
[3]u64{ 9223372036854775808, 14244638523341127254, 234783588188 },
[3]u64{ 0, 12246016810439753984, 92772203401 },
[3]u64{ 0, 9382741764551081984, 137663857901 },
[3]u64{ 0, 4608696190291148800, 237508639450 },
[3]u64{ 0, 1696483666416369664, 218249837921 },
[3]u64{ 0, 15416683541605384192, 97091966563 },
[3]u64{ 0, 7683140964294066176, 99835740089 },
[3]u64{ 0, 4611686018427387904, 185416503906 },
[3]u64{ 0, 0, 98250000000 },
[3]u64{ 0, 0, 128000000000 },
[3]u64{ 3877189582299842749, 352, 0 },
[3]u64{ 7625565791857948238, 352210182868, 0 },
[3]u64{ 16568435163612007484, 1722045467931902045, 19 },
[3]u64{ 17592071940521808130, 16095324008152856733, 19093352271 },
[3]u64{ 15158637878035490831, 15216188060094280738, 79872529262 },
[3]u64{ 17789243229146401893, 10793385929903030893, 110824871207 },
[3]u64{ 14677686051252896484, 12613277226875940039, 39585110623 },
[3]u64{ 3531237481269211986, 10644539625155600107, 95683767128 },
[3]u64{ 8074435404989280910, 6181262895644173983, 88577041649 },
[3]u64{ 7086549341467684427, 148914399627082292, 241335086933 },
[3]u64{ 10556134770918626963, 14379289774887985969, 85008072665 },
[3]u64{ 10772666134712966775, 11743339675582627452, 217779502860 },
[3]u64{ 6195173298198112620, 7841621929809463497, 12636607719 },
[3]u64{ 8144773843324250887, 11168944680251236601, 231425095176 },
[3]u64{ 14144284817150924691, 6178560202529287410, 8605469704 },
[3]u64{ 6464447844648863176, 13295243308201596112, 8334940419 },
[3]u64{ 15760468443293179135, 17040673746172470291, 3720736583 },
[3]u64{ 5172191224908322475, 14957442487039409922, 71923776774 },
[3]u64{ 2357554307308969012, 17778155426506992152, 6810844581 },
[3]u64{ 1602046917604361745, 14945404984219733899, 165963755736 },
[3]u64{ 7830970218109515845, 11590754866058681505, 216810192027 },
[3]u64{ 2899479134887821084, 6020790784469412466, 155628336080 },
[3]u64{ 15792042302392017912, 7934351824569522326, 208326387722 },
[3]u64{ 11286099112296056199, 5038361112172116744, 10430122074 },
[3]u64{ 15161477829153947404, 3305187319649924210, 90273130103 },
[3]u64{ 423831848142641767, 11470175511099161552, 119179174563 },
[3]u64{ 9707413321046312582, 7308362160352048610, 163621799460 },
[3]u64{ 10969483299803835620, 10666410671225576634, 36396187106 },
[3]u64{ 4326479556120930304, 2181639019945820785, 226578227281 },
[3]u64{ 12876227232041795584, 4615749499734847918, 81118266888 },
[3]u64{ 16967986827791171584, 14076159200958497580, 8250220281 },
[3]u64{ 1288146316538413056, 5470405257862074105, 249763070119 },
[3]u64{ 13715290452691779584, 4565741478181339543, 167296551263 },
[3]u64{ 4683743612465315840, 8901832997861862329, 95247509341 },
[3]u64{ 0, 14190141170191714122, 93482569333 },
[3]u64{ 0, 4240772322245764096, 117769249094 },
[3]u64{ 0, 4422842195340951552, 70229892728 },
[3]u64{ 0, 15448426386733137920, 120239762755 },
[3]u64{ 0, 9203504548935630848, 67837460872 },
[3]u64{ 0, 5936377627571912704, 136498922981 },
[3]u64{ 0, 468374361246531584, 229321811676 },
[3]u64{ 0, 0, 220025390625 },
[3]u64{ 0, 0, 33000000000 },
[3]u64{ 16344805304534272784, 5374300, 0 },
[3]u64{ 26429987091348271, 5374300886053671, 0 },
[3]u64{ 8691371289609838059, 8020875056524075716, 291341 },
[3]u64{ 12980168378493046550, 1400288714762747253, 13434812508 },
[3]u64{ 14010125458129496139, 6136037711314764689, 92075909803 },
[3]u64{ 17061829677031795106, 15735488086392394102, 171332635270 },
[3]u64{ 2227928323072698520, 7735094782793634552, 134853022518 },
[3]u64{ 7394752319272287289, 7273689191766726188, 54419320328 },
[3]u64{ 8805771303577744757, 3410634565056431030, 8394307481 },
[3]u64{ 16371027194302248385, 4600927904885215898, 153184890870 },
[3]u64{ 9114324123731231602, 9154871331680374746, 246249416801 },
[3]u64{ 14468189808746991893, 6117978272461042996, 97496286569 },
[3]u64{ 2376054557800684348, 13116904339287496285, 105331656266 },
[3]u64{ 12462238943546048571, 867037205615660831, 74711068809 },
[3]u64{ 15334855370842605909, 1802487145191504830, 137047002181 },
[3]u64{ 7211347914013798462, 17242009718457409007, 69097713023 },
[3]u64{ 13763642332572548877, 13620802355488468049, 127934691219 },
[3]u64{ 16868268377740071383, 4442227880594435745, 147738385175 },
[3]u64{ 1120013377627684177, 17354849212854314181, 23240813655 },
[3]u64{ 15898107650717274388, 18202319179831567886, 87940808260 },
[3]u64{ 12281923376333274277, 17568634016348874558, 68986749699 },
[3]u64{ 6383530489286615044, 7496925598312450672, 3952397558 },
[3]u64{ 4253822060257126466, 601870379496813865, 246406409151 },
[3]u64{ 17614372438391501998, 11995106565680728027, 191032627458 },
[3]u64{ 4309951310554333450, 16331071694764184179, 2650256029 },
[3]u64{ 13106185988973773020, 9665962217000524208, 157885309170 },
[3]u64{ 2070134359761960547, 13682661374415474390, 242523992861 },
[3]u64{ 9399359914137865875, 6940361789924260864, 29741738559 },
[3]u64{ 17415053284723541264, 9658039831644010465, 63376237766 },
[3]u64{ 4840502610448261120, 6843715893910236922, 198523563388 },
[3]u64{ 5690599259712258048, 47089792870595660, 124370998582 },
[3]u64{ 114769594245185536, 14510386192097156932, 54002552742 },
[3]u64{ 3150620882578178048, 12059931208360040296, 166786609611 },
[3]u64{ 5136918324969472000, 14877013468459184620, 203653770180 },
[3]u64{ 7205759403792793600, 2397668560671695044, 196806484516 },
[3]u64{ 0, 2195572305559232232, 36129977873 },
[3]u64{ 0, 3261686279425953792, 17119022213 },
[3]u64{ 0, 9333850662059900928, 133176816367 },
[3]u64{ 0, 5036522340217782272, 239505989058 },
[3]u64{ 0, 2800120215143186432, 194273030423 },
[3]u64{ 0, 441634238459019264, 23151794821 },
[3]u64{ 0, 720575940379279360, 133023941040 },
[3]u64{ 0, 0, 176039062500 },
[3]u64{ 0, 0, 228000000000 },
[3]u64{ 98202693831717807, 82, 0 },
[3]u64{ 12909287260170414079, 82005323578, 0 },
[3]u64{ 11728631949380786233, 8218347283861607400, 4 },
[3]u64{ 18263701925522197718, 17896200385973633643, 4445517498 },
[3]u64{ 4868886449713321591, 16333242102094352209, 186970154966 },
[3]u64{ 5870139507184082354, 9981905728606788815, 214885426828 },
[3]u64{ 5978562500822661575, 15219470018924839012, 140541120193 },
[3]u64{ 10821136839630268472, 17152070168529617370, 193825049122 },
[3]u64{ 9490907630136752916, 17841343440958328027, 34929815586 },
[3]u64{ 10564005678001613989, 17291078023923990493, 34967181165 },
[3]u64{ 5754050547468481222, 16744804581790759223, 109937351217 },
[3]u64{ 3833909949855542602, 5001622214111594905, 49907737675 },
[3]u64{ 15446538552665967784, 9676746897435398146, 75271138483 },
[3]u64{ 14924837848804399130, 8109025833995118532, 179524577500 },
[3]u64{ 18140170340418344208, 5495826424046694744, 220439591171 },
[3]u64{ 11380424819825208971, 7890288164365705852, 3297929347 },
[3]u64{ 12416915664152252547, 8616438349039895217, 131427733378 },
[3]u64{ 17195282241626289958, 15787154801788760618, 130467098058 },
[3]u64{ 2649541045825281326, 12418659311480782502, 202855823376 },
[3]u64{ 16577429864268509676, 4486988874116669987, 16673216870 },
[3]u64{ 12051257060168107241, 4828971301551875409, 102243240154 },
[3]u64{ 5363884561143470797, 14769106422014442226, 218261779058 },
[3]u64{ 13054029903083620184, 7763933466423188156, 114800634863 },
[3]u64{ 566314952158634945, 10449097116253839963, 239420883676 },
[3]u64{ 1329472079642345682, 12870692502472900571, 220566446689 },
[3]u64{ 15686237486658857211, 11597479481311003817, 97697721638 },
[3]u64{ 1069073549290598129, 8294994869530047486, 38628700622 },
[3]u64{ 4323599065125928507, 16879315829924478241, 206449672572 },
[3]u64{ 17861823329752681586, 11873324837601439670, 124915029544 },
[3]u64{ 17220149985412802078, 3277599055636107318, 40643654229 },
[3]u64{ 4344934572159429184, 15363467897354242201, 85177679000 },
[3]u64{ 2252927464837120000, 10351182204479784367, 152832855263 },
[3]u64{ 10910018171964489728, 12811517584931924466, 223561138711 },
[3]u64{ 3597328585515335680, 16988930699558748726, 23694513759 },
[3]u64{ 6972808074239148032, 11683499918824718325, 95920971778 },
[3]u64{ 2227030015734710272, 13119300691281647499, 2633363799 },
[3]u64{ 1152921504606846976, 10125549106595354099, 87711198715 },
[3]u64{ 0, 17505352699870800544, 251548907116 },
[3]u64{ 0, 6756039242241163264, 108948967071 },
[3]u64{ 0, 3537338758766526464, 159366245621 },
[3]u64{ 0, 6522626374119718912, 245191759518 },
[3]u64{ 0, 4733294203482669056, 158353592284 },
[3]u64{ 0, 16997710893603094528, 220256592392 },
[3]u64{ 0, 16717361816799281152, 8921447753 },
[3]u64{ 0, 0, 73906250000 },
[3]u64{ 0, 0, 16000000000 },
[3]u64{ 17238287503805244910, 1251301, 0 },
[3]u64{ 1434575446038410275, 1251301934489438, 0 },
[3]u64{ 14009569747841241694, 3943737498063000362, 67833 },
[3]u64{ 14938795732275951328, 2870731037991212489, 249213790438 },
[3]u64{ 6687653542888983473, 7389433400402095883, 230155622641 },
[3]u64{ 28238723295162625, 5675049236146197433, 241400581987 },
[3]u64{ 4745270274832691214, 9953779846262904264, 99307645035 },
[3]u64{ 926478968112308824, 12691978937179636241, 107539595486 },
[3]u64{ 9213681606604198526, 15523327331528198029, 222688033556 },
[3]u64{ 13346223820579313024, 15722603279568118520, 20841521260 },
[3]u64{ 691642518601291257, 11838632364171816147, 108852324031 },
[3]u64{ 1153720150033789192, 7832751832367143680, 191641773546 },
[3]u64{ 12089015034721780810, 12167724027162940862, 234424614327 },
[3]u64{ 3555868702841788854, 4108211144748152962, 183659613641 },
[3]u64{ 11708406782758214328, 7530983398136343676, 201222706572 },
[3]u64{ 9417497762905343943, 1117587133956542355, 140408255428 },
[3]u64{ 12838336066957615287, 17134748625149490872, 196060584519 },
[3]u64{ 13737708142128207419, 4039918359454207848, 71928876584 },
[3]u64{ 11683434809834695853, 1830218764589441242, 40219004413 },
[3]u64{ 2689114340106315837, 637895981480825742, 253099216358 },
[3]u64{ 8859225263374261032, 8246879226348334620, 230034580410 },
[3]u64{ 15761671984578600096, 12389239568142583275, 186447064218 },
[3]u64{ 7087267079878005352, 14041257178803154398, 154671622022 },
[3]u64{ 4601291730423121377, 16312515716494630702, 134761178076 },
[3]u64{ 9559411037059581623, 17088522799596987756, 220884303248 },
[3]u64{ 12969820289641388091, 3588932524637852678, 144926370677 },
[3]u64{ 13628239920285957130, 107218049069817414, 117194556422 },
[3]u64{ 8049893933765800625, 1596707240462008334, 6005812302 },
[3]u64{ 10391755948840250234, 17461913142391587672, 78086557672 },
[3]u64{ 14454650777462444512, 4366474266651610090, 232946612208 },
[3]u64{ 14244638523341127254, 5539304013194805084, 240236707044 },
[3]u64{ 12246016810439753984, 4762470619211987849, 228300286272 },
[3]u64{ 9382741764551081984, 10835638458986644717, 64258174049 },
[3]u64{ 4608696190291148800, 16141642290510052058, 97587401137 },
[3]u64{ 1696483666416369664, 17390568670756355425, 177875040181 },
[3]u64{ 15416683541605384192, 12536768491333867107, 181942744616 },
[3]u64{ 7683140964294066176, 13145148522871947193, 40679619581 },
[3]u64{ 4611686018427387904, 5665349945233068642, 253712599929 },
[3]u64{ 0, 17074607537751066240, 121307119235 },
[3]u64{ 0, 6241525660962062336, 131925616329 },
[3]u64{ 0, 1142860629783085056, 201338353784 },
[3]u64{ 0, 16287527416870469632, 120061954598 },
[3]u64{ 0, 9028002014738513920, 38882948630 },
[3]u64{ 0, 16217462258161156096, 22489408969 },
[3]u64{ 0, 11529215046068469760, 201879150390 },
[3]u64{ 0, 0, 54625000000 },
[3]u64{ 0, 0, 64000000000 },
[3]u64{ 1722045467931902045, 19, 0 },
[3]u64{ 16095324008152856733, 19093352271, 0 },
[3]u64{ 15216188060094280738, 646608198162977646, 1 },
[3]u64{ 10793385929903030893, 12170458846894708007, 1035052700 },
[3]u64{ 12613277226875940039, 1797330480103086687, 156659761896 },
[3]u64{ 10644539625155600107, 10332188564497263448, 232097433480 },
[3]u64{ 6181262895644173983, 7524259485079594225, 136560109064 },
[3]u64{ 148914399627082292, 62681109059153749, 8407890924 },
[3]u64{ 14379289774887985969, 13480636451804037081, 236003397949 },
[3]u64{ 11743339675582627452, 6948168233012789004, 61730786766 },
[3]u64{ 7841621929809463497, 12015502974041806055, 206376660954 },
[3]u64{ 11168944680251236601, 7343801660689004040, 218651361721 },
[3]u64{ 6178560202529287410, 13670580858640731144, 185398108285 },
[3]u64{ 13295243308201596112, 5605073897566574851, 125741083673 },
[3]u64{ 17040673746172470291, 15387788940505247559, 25303851664 },
[3]u64{ 14957442487039409922, 17565181499678113030, 144834173709 },
[3]u64{ 17778155426506992152, 1893743623847493029, 13952210397 },
[3]u64{ 14945404984219733899, 10243498996716269784, 221102660047 },
[3]u64{ 11590754866058681505, 5619675836950314139, 207555301193 },
[3]u64{ 6020790784469412466, 10224869737511515088, 73304643237 },
[3]u64{ 7934351824569522326, 2574495974386198538, 165554291299 },
[3]u64{ 5038361112172116744, 7825756347302873178, 99139563706 },
[3]u64{ 3305187319649924210, 12071550103794656887, 186424235101 },
[3]u64{ 11470175511099161552, 7195875213867606691, 93654400042 },
[3]u64{ 7308362160352048610, 18271364438406891044, 42390089176 },
[3]u64{ 10666410671225576634, 16966521933952564706, 216990492650 },
[3]u64{ 2181639019945820785, 289920862029570129, 234919756997 },
[3]u64{ 4615749499734847918, 7804199568098625032, 197015716641 },
[3]u64{ 14076159200958497580, 5758118571242446585, 33423066506 },
[3]u64{ 5470405257862074105, 4030788293606375591, 138312148233 },
[3]u64{ 4565741478181339543, 4387716460037196127, 9218509471 },
[3]u64{ 8901832997861862329, 16807506478881285981, 159237858585 },
[3]u64{ 14190141170191714122, 17033060604413529717, 25911136751 },
[3]u64{ 4240772322245764096, 10498418508292170054, 239923364065 },
[3]u64{ 4422842195340951552, 13237752038744465016, 225569120407 },
[3]u64{ 15448426386733137920, 17737618428304633155, 151717619975 },
[3]u64{ 9203504548935630848, 13546183833248825736, 7961558221 },
[3]u64{ 5936377627571912704, 826778452978976229, 205734340097 },
[3]u64{ 468374361246531584, 13728076626990147292, 1044819749 },
[3]u64{ 0, 2794860281883592225, 37744200525 },
[3]u64{ 0, 8680705720425908736, 77151509679 },
[3]u64{ 0, 731520517439488000, 175470582000 },
[3]u64{ 0, 13120812320768917504, 240039655806 },
[3]u64{ 0, 2722954908557901824, 126711280661 },
[3]u64{ 0, 6860847004205973504, 21147611681 },
[3]u64{ 0, 6503197861922996224, 33371927261 },
[3]u64{ 0, 9223372036854775808, 221352539062 },
[3]u64{ 0, 0, 182500000000 },
[3]u64{ 8020875056524075716, 291341, 0 },
[3]u64{ 1400288714762747253, 291341434812508, 0 },
[3]u64{ 6136037711314764689, 12005656413127238315, 15793 },
[3]u64{ 15735488086392394102, 4821130826186787462, 177650827938 },
[3]u64{ 7735094782793634552, 14377899467066168118, 162261354025 },
[3]u64{ 7273689191766726188, 16575613239625444872, 41779427491 },
[3]u64{ 3410634565056431030, 4317827099179284377, 163898565794 },
[3]u64{ 4600927904885215898, 1242354770412171254, 162234069876 },
[3]u64{ 9154871331680374746, 994838588328896609, 116067348187 },
[3]u64{ 6117978272461042996, 17283309862013060457, 219053930307 },
[3]u64{ 13116904339287496285, 124242522249856586, 67936930105 },
[3]u64{ 867037205615660831, 11564608014666985609, 57006735200 },
[3]u64{ 1802487145191504830, 12401028575581654085, 96626918656 },
[3]u64{ 17242009718457409007, 2490725392961465727, 672261106 },
[3]u64{ 13620802355488468049, 1949482237120640915, 242135022494 },
[3]u64{ 4442227880594435745, 15410502396166200087, 158105681643 },
[3]u64{ 17354849212854314181, 15694919529799920727, 235835405008 },
[3]u64{ 18202319179831567886, 10324869370171768388, 208850823292 },
[3]u64{ 17568634016348874558, 1631866459122189059, 124559712290 },
[3]u64{ 7496925598312450672, 172020494461226230, 34088463658 },
[3]u64{ 601870379496813865, 12734610307908856767, 42009325249 },
[3]u64{ 11995106565680728027, 1467513250829340930, 193690344608 },
[3]u64{ 16331071694764184179, 13558759428494307997, 160079554052 },
[3]u64{ 9665962217000524208, 7915355143999496434, 4735021821 },
[3]u64{ 13682661374415474390, 2876370200608797469, 253429092262 },
[3]u64{ 6940361789924260864, 343685370404989503, 166155928341 },
[3]u64{ 9658039831644010465, 4837266557407634630, 21018631221 },
[3]u64{ 6843715893910236922, 9622591415747161468, 53262228745 },
[3]u64{ 47089792870595660, 16503783814424220982, 9521641725 },
[3]u64{ 14510386192097156932, 5377083431343591334, 253894671913 },
[3]u64{ 12059931208360040296, 16508482371299291595, 41291492276 },
[3]u64{ 14877013468459184620, 10515883558812249028, 180894926622 },
[3]u64{ 2397668560671695044, 63492062913405476, 30570067190 },
[3]u64{ 2195572305559232232, 11571919759617799697, 246003441911 },
[3]u64{ 3261686279425953792, 2956602334970088581, 247627315027 },
[3]u64{ 9333850662059900928, 13604736747717849839, 83160277733 },
[3]u64{ 5036522340217782272, 16573540719338151362, 229737514256 },
[3]u64{ 2800120215143186432, 12620703004601168151, 16898453442 },
[3]u64{ 441634238459019264, 14649407809089591941, 194684169680 },
[3]u64{ 720575940379279360, 11290375247898624432, 208794145988 },
[3]u64{ 0, 11020319450292874212, 196612052468 },
[3]u64{ 0, 8754634933362354176, 244597412714 },
[3]u64{ 0, 12976319450332528640, 106474589710 },
[3]u64{ 0, 17447331119627239424, 14703447686 },
[3]u64{ 0, 3665184902673858560, 134945821715 },
[3]u64{ 0, 12949678516038795264, 19198690071 },
[3]u64{ 0, 72057594037927936, 23702003479 },
[3]u64{ 0, 0, 23003906250 },
[3]u64{ 0, 0, 202000000000 },
[3]u64{ 8218347283861607400, 4, 0 },
[3]u64{ 17896200385973633643, 4445517498, 0 },
[3]u64{ 16333242102094352209, 4445517498970154966, 0 },
[3]u64{ 9981905728606788815, 9413159735776077452, 240991986 },
[3]u64{ 15219470018924839012, 14279163482889998017, 242510288411 },
[3]u64{ 17152070168529617370, 8693044629541194274, 27774075003 },
[3]u64{ 17841343440958328027, 11863110253260222498, 123471250893 },
[3]u64{ 17291078023923990493, 8319293368489531245, 205643100495 },
[3]u64{ 16744804581790759223, 3376307525676489265, 79450989797 },
[3]u64{ 5001622214111594905, 13205662254759912523, 229183029997 },
[3]u64{ 9676746897435398146, 5276250334231686323, 237715880385 },
[3]u64{ 8109025833995118532, 13790198520922745052, 193286026103 },
[3]u64{ 5495826424046694744, 14195535250150996227, 119747568159 },
[3]u64{ 7890288164365705852, 16425228796427004035, 31769541507 },
[3]u64{ 8616438349039895217, 4295900841296269186, 131890413437 },
[3]u64{ 15787154801788760618, 4533952595483946442, 125232881251 },
[3]u64{ 12418659311480782502, 12885038019373447184, 99245786062 },
[3]u64{ 4486988874116669987, 12140736240487831910, 206698499310 },
[3]u64{ 4828971301551875409, 6927124077155322074, 238658150630 },
[3]u64{ 14769106422014442226, 12477788342407819890, 230375520148 },
[3]u64{ 7763933466423188156, 7980854329409711087, 148676422261 },
[3]u64{ 10449097116253839963, 2062671021810827996, 117432642980 },
[3]u64{ 12870692502472900571, 2739521363598172769, 164111817620 },
[3]u64{ 11597479481311003817, 12897585686593465638, 148148509750 },
[3]u64{ 8294994869530047486, 1127632646629044686, 54699179521 },
[3]u64{ 16879315829924478241, 4833775019274666364, 1061129088 },
[3]u64{ 11873324837601439670, 15867662672939849256, 128262039468 },
[3]u64{ 3277599055636107318, 2092350330982953557, 172860187717 },
[3]u64{ 15363467897354242201, 13330062299842493592, 69113426538 },
[3]u64{ 10351182204479784367, 4479193352178519263, 106722624125 },
[3]u64{ 12811517584931924466, 3149393938889064983, 125242817558 },
[3]u64{ 16988930699558748726, 9736379904070620767, 22170728987 },
[3]u64{ 11683499918824718325, 3816238703055069186, 27527810212 },
[3]u64{ 13119300691281647499, 11598915938798661975, 164206878714 },
[3]u64{ 10125549106595354099, 17821633264606555643, 250628778492 },
[3]u64{ 17505352699870800544, 2514623558764574316, 252966112675 },
[3]u64{ 6756039242241163264, 4976730480406253215, 163136318016 },
[3]u64{ 3537338758766526464, 17276563697191611637, 64269789099 },
[3]u64{ 6522626374119718912, 12524734095940998814, 171936564394 },
[3]u64{ 4733294203482669056, 15331551308930355164, 170678967195 },
[3]u64{ 16997710893603094528, 15417115581125943816, 155831125061 },
[3]u64{ 16717361816799281152, 6010750237807115593, 69835763510 },
[3]u64{ 0, 5624630987553628432, 54325843423 },
[3]u64{ 0, 14881848243837640704, 223304911856 },
[3]u64{ 0, 15281613886881529856, 240806746609 },
[3]u64{ 0, 14057902358273196032, 241828417948 },
[3]u64{ 0, 16075318494433902592, 156762080413 },
[3]u64{ 0, 13891916000577716224, 157871444761 },
[3]u64{ 0, 7205759403792793600, 25753082275 },
[3]u64{ 0, 0, 163390625000 },
[3]u64{ 0, 0, 232000000000 },
[3]u64{ 3943737498063000362, 67833, 0 },
[3]u64{ 2870731037991212489, 67833213790438, 0 },
[3]u64{ 7389433400402095883, 4535831408134330609, 3677 },
[3]u64{ 5675049236146197433, 6204770794376564579, 93245887913 },
[3]u64{ 9953779846262904264, 13869812122751887467, 169336361298 },
[3]u64{ 12691978937179636241, 14253229412394467550, 82751884021 },
[3]u64{ 15523327331528198029, 12776557610216045332, 245772669114 },
[3]u64{ 15722603279568118520, 16493640728678654060, 186692618575 },
[3]u64{ 11838632364171816147, 9434398296825833151, 79894122055 },
[3]u64{ 7832751832367143680, 8773374058285327850, 71511439756 },
[3]u64{ 12167724027162940862, 12932015276748029367, 140475605560 },
[3]u64{ 4108211144748152962, 16293958583527755209, 56701045952 },
[3]u64{ 7530983398136343676, 13511893936143127948, 192883297264 },
[3]u64{ 1117587133956542355, 18409936402005226436, 240732481237 },
[3]u64{ 17134748625149490872, 2189663026458466887, 213998004652 },
[3]u64{ 4039918359454207848, 9497725274248154664, 172118701870 },
[3]u64{ 1830218764589441242, 14766925481127792125, 46514872718 },
[3]u64{ 637895981480825742, 6982373971809635814, 142800516634 },
[3]u64{ 8246879226348334620, 8616702383006884794, 26378515251 },
[3]u64{ 12389239568142583275, 3059473300040871066, 51467112372 },
[3]u64{ 14041257178803154398, 17123843157031495558, 180165854379 },
[3]u64{ 16312515716494630702, 11210627174210626524, 171928285397 },
[3]u64{ 17088522799596987756, 15868067138625928592, 213607729316 },
[3]u64{ 3588932524637852678, 4467869511636937589, 164860209643 },
[3]u64{ 107218049069817414, 10052108125844341766, 235242203691 },
[3]u64{ 1596707240462008334, 7470588003218451534, 43544925873 },
[3]u64{ 17461913142391587672, 2613527085490786280, 177404981387 },
[3]u64{ 4366474266651610090, 3632919450036549616, 139141679587 },
[3]u64{ 5539304013194805084, 179367907231218916, 227196940958 },
[3]u64{ 4762470619211987849, 13553068184555874624, 158009723553 },
[3]u64{ 10835638458986644717, 8798774862365584481, 161734713298 },
[3]u64{ 16141642290510052058, 910911255817064881, 210476982541 },
[3]u64{ 17390568670756355425, 2304331144765093813, 13049380598 },
[3]u64{ 12536768491333867107, 12248937023083640360, 246124918041 },
[3]u64{ 13145148522871947193, 10206039550662130685, 25664016206 },
[3]u64{ 5665349945233068642, 12267881323837852537, 78553270512 },
[3]u64{ 17074607537751066240, 2858642007937891971, 240665043179 },
[3]u64{ 6241525660962062336, 14171330289750320841, 235154967293 },
[3]u64{ 1142860629783085056, 6601103619749017720, 253768229354 },
[3]u64{ 16287527416870469632, 4919573414486739494, 234357846544 },
[3]u64{ 9028002014738513920, 3401998285294974486, 16266690609 },
[3]u64{ 16217462258161156096, 10799436256515532233, 49184422696 },
[3]u64{ 11529215046068469760, 10083786644665753398, 40585438612 },
[3]u64{ 0, 6481194517685688896, 148546643169 },
[3]u64{ 0, 15104161756860547072, 225351346258 },
[3]u64{ 0, 9556039274244079616, 82818798249 },
[3]u64{ 0, 1376343134954323968, 169518033927 },
[3]u64{ 0, 15682488278596976640, 7074611710 },
[3]u64{ 0, 1506454075355430912, 254850149393 },
[3]u64{ 0, 1152921504606846976, 17081665039 },
[3]u64{ 0, 0, 15062500000 },
[3]u64{ 0, 0, 160000000000 },
[3]u64{ 12170458846894708007, 1035052700, 0 },
[3]u64{ 1797330480103086687, 1035052700659761896, 0 },
[3]u64{ 10332188564497263448, 6172559441576707976, 56110319 },
[3]u64{ 7524259485079594225, 15083329738554729992, 239334615117 },
[3]u64{ 62681109059153749, 10013126833549229036, 77817668943 },
[3]u64{ 13480636451804037081, 5817156823499936061, 79542812693 },
[3]u64{ 6948168233012789004, 5282692560913632718, 21315348703 },
[3]u64{ 12015502974041806055, 10252307034225766362, 223286375337 },
[3]u64{ 7343801660689004040, 17981881283247669689, 169555778677 },
[3]u64{ 13670580858640731144, 11689290159733383293, 117974799737 },
[3]u64{ 5605073897566574851, 5530668968487988249, 121633677689 },
[3]u64{ 15387788940505247559, 10083765740821947024, 121299818165 },
[3]u64{ 17565181499678113030, 2798423656816843533, 181546642036 },
[3]u64{ 1893743623847493029, 7614494481582904797, 116151702850 },
[3]u64{ 10243498996716269784, 17811318500083423695, 66412782572 },
[3]u64{ 5619675836950314139, 11641467412200329033, 236965553510 },
[3]u64{ 10224869737511515088, 17733593025296340645, 102631085212 },
[3]u64{ 2574495974386198538, 3689424000190644835, 156961340004 },
[3]u64{ 7825756347302873178, 14966634145516728506, 100200004075 },
[3]u64{ 12071550103794656887, 14171681941562070109, 235811342862 },
[3]u64{ 7195875213867606691, 8130575762882608170, 14768248417 },
[3]u64{ 18271364438406891044, 5234550794400656856, 97440759395 },
[3]u64{ 16966521933952564706, 3020576149360486378, 99283765567 },
[3]u64{ 289920862029570129, 3038675756589057221, 63163745761 },
[3]u64{ 7804199568098625032, 15470260187120878369, 225164726942 },
[3]u64{ 5758118571242446585, 3497929414841828746, 158838644485 },
[3]u64{ 4030788293606375591, 9935840636861015305, 5189623133 },
[3]u64{ 4387716460037196127, 3647355485153741471, 93538623000 },
[3]u64{ 16807506478881285981, 766100215038272793, 24197723537 },
[3]u64{ 17033060604413529717, 16128087474216800751, 145041530375 },
[3]u64{ 10498418508292170054, 16216631732633731297, 7874305373 },
[3]u64{ 13237752038744465016, 13760220872779997335, 93879105367 },
[3]u64{ 17737618428304633155, 3826276262374222087, 87745943068 },
[3]u64{ 13546183833248825736, 14938032745839181005, 28207422851 },
[3]u64{ 826778452978976229, 14479259995009508865, 131809792377 },
[3]u64{ 13728076626990147292, 2372033248156102437, 121784922257 },
[3]u64{ 2794860281883592225, 792005346826701645, 145128588180 },
[3]u64{ 8680705720425908736, 16278924527931792559, 148042934695 },
[3]u64{ 731520517439488000, 17442516423538940144, 167882482266 },
[3]u64{ 13120812320768917504, 13844184233048446, 90945560710 },
[3]u64{ 2722954908557901824, 13486193870480782357, 134000750494 },
[3]u64{ 6860847004205973504, 11931315179184648737, 158731088034 },
[3]u64{ 6503197861922996224, 16492562205587485405, 162646797891 },
[3]u64{ 9223372036854775808, 12128987217680380854, 67894063588 },
[3]u64{ 0, 10568123814189138176, 228657513714 },
[3]u64{ 0, 17007583519117541376, 242572899139 },
[3]u64{ 0, 143791533903052800, 67921982950 },
[3]u64{ 0, 12398714235792654336, 230007794954 },
[3]u64{ 0, 9659957317919047680, 10672135645 },
[3]u64{ 0, 9412523221204336640, 221523667335 },
[3]u64{ 0, 4611686018427387904, 135510253906 },
[3]u64{ 0, 0, 82250000000 },
[3]u64{ 0, 0, 128000000000 },
[3]u64{ 12005656413127238315, 15793, 0 },
[3]u64{ 4821130826186787462, 15793650827938, 0 },
[3]u64{ 14377899467066168118, 3237900842885170729, 856 },
[3]u64{ 16575613239625444872, 7515893506498066595, 88175526956 },
[3]u64{ 4317827099179284377, 7300206309181072546, 44407437403 },
[3]u64{ 1242354770412171254, 5999737279837044, 91395744977 },
[3]u64{ 994838588328896609, 7556839307242450651, 209000325246 },
[3]u64{ 17283309862013060457, 12946035041643640643, 126409657079 },
[3]u64{ 124242522249856586, 15885877642352740665, 247701805965 },
[3]u64{ 11564608014666985609, 10770818348246089568, 141861175152 },
[3]u64{ 12401028575581654085, 11635415503599551744, 112583887232 },
[3]u64{ 2490725392961465727, 6248053924100826098, 128630757138 },
[3]u64{ 1949482237120640915, 16894170802729859998, 18338707681 },
[3]u64{ 15410502396166200087, 6143589029651889899, 225915834834 },
[3]u64{ 15694919529799920727, 11812087701837886160, 210333044628 },
[3]u64{ 10324869370171768388, 7306705080150829180, 148640334557 },
[3]u64{ 1631866459122189059, 1485332570280714274, 221396097276 },
[3]u64{ 172020494461226230, 18042602303295630634, 252080520039 },
[3]u64{ 12734610307908856767, 13397029889257074369, 103978091430 },
[3]u64{ 1467513250829340930, 9948104869613411488, 166726254445 },
[3]u64{ 13558759428494307997, 10836066241170646532, 109539287845 },
[3]u64{ 7915355143999496434, 18330574781234459389, 37587424327 },
[3]u64{ 2876370200608797469, 666297360208433062, 71993702450 },
[3]u64{ 343685370404989503, 5035352224889324309, 50036120052 },
[3]u64{ 4837266557407634630, 1341745796439923765, 244272966991 },
[3]u64{ 9622591415747161468, 6846932182653803785, 79072736185 },
[3]u64{ 16503783814424220982, 6727685027257825533, 185371172937 },
[3]u64{ 5377083431343591334, 2168538874806877737, 73364708536 },
[3]u64{ 16508482371299291595, 17694936100676971444, 184117556727 },
[3]u64{ 10515883558812249028, 2163944241059563294, 247959244408 },
[3]u64{ 63492062913405476, 6727780864524301558, 120117307652 },
[3]u64{ 11571919759617799697, 8599551977795002615, 4364713731 },
[3]u64{ 2956602334970088581, 15428264807806859091, 3466182646 },
[3]u64{ 13604736747717849839, 2126771385339683557, 246836367911 },
[3]u64{ 16573540719338151362, 15094316562082972944, 39115292507 },
[3]u64{ 12620703004601168151, 8111300598225956802, 91818264540 },
[3]u64{ 14649407809089591941, 9481215200564260304, 220439714486 },
[3]u64{ 11290375247898624432, 16836674128623424708, 182513977705 },
[3]u64{ 11020319450292874212, 7087243115299722740, 105912717933 },
[3]u64{ 8754634933362354176, 2343560867338408810, 109384200219 },
[3]u64{ 12976319450332528640, 3431385749090422286, 27127044689 },
[3]u64{ 17447331119627239424, 3504545517469224582, 81186015794 },
[3]u64{ 3665184902673858560, 3333759805712094227, 50189981793 },
[3]u64{ 12949678516038795264, 3595183476205994775, 97180723481 },
[3]u64{ 72057594037927936, 14191566632569921303, 25194895286 },
[3]u64{ 0, 12917427671358095562, 182769326368 },
[3]u64{ 0, 3883793922738316288, 32700255157 },
[3]u64{ 0, 7857281689266421760, 181210540890 },
[3]u64{ 0, 15987081651486195712, 90425944093 },
[3]u64{ 0, 16827562156399525888, 29866661432 },
[3]u64{ 0, 7012737938513461248, 56912223972 },
[3]u64{ 0, 7385903388887613440, 228380161285 },
[3]u64{ 0, 0, 5400390625 },
[3]u64{ 0, 0, 225000000000 },
[3]u64{ 9413159735776077452, 240991986, 0 },
[3]u64{ 14279163482889998017, 240991986510288411, 0 },
[3]u64{ 8693044629541194274, 14135788013842776187, 13064201 },
[3]u64{ 11863110253260222498, 13284322918167594445, 9766302603 },
[3]u64{ 8319293368489531245, 7264587765474046287, 139720144588 },
[3]u64{ 3376307525676489265, 16176482219778368741, 204393814091 },
[3]u64{ 13205662254759912523, 5401983818872095469, 75876928858 },
[3]u64{ 5276250334231686323, 11208857446851049921, 90292842129 },
[3]u64{ 13790198520922745052, 13794690008281035639, 145607633379 },
[3]u64{ 14195535250150996227, 14519782740993303071, 227747811643 },
[3]u64{ 16425228796427004035, 10885858587044789123, 59787118999 },
[3]u64{ 4295900841296269186, 8710500938899914621, 151590123576 },
[3]u64{ 4533952595483946442, 1284182587483102819, 56472197202 },
[3]u64{ 12885038019373447184, 10346074482131502030, 82069615677 },
[3]u64{ 12140736240487831910, 9429804686255246574, 61560861821 },
[3]u64{ 6927124077155322074, 6412022633845121254, 125511190736 },
[3]u64{ 12477788342407819890, 8892351297529018260, 208347596443 },
[3]u64{ 7980854329409711087, 14098160105983060597, 155482055329 },
[3]u64{ 2062671021810827996, 13793833029739474340, 161764262790 },
[3]u64{ 2739521363598172769, 16367653765996977044, 134747765186 },
[3]u64{ 12897585686593465638, 10684788343333772342, 194887292288 },
[3]u64{ 1127632646629044686, 13272681218705145345, 128579223536 },
[3]u64{ 4833775019274666364, 11093568615497829248, 240719513490 },
[3]u64{ 15867662672939849256, 12488220765137758124, 146601383559 },
[3]u64{ 2092350330982953557, 3727114642519696453, 135676987804 },
[3]u64{ 13330062299842493592, 11549865375695057514, 156202047289 },
[3]u64{ 4479193352178519263, 11292809154908783229, 57626119456 },
[3]u64{ 3149393938889064983, 17723904861837310998, 32612184410 },
[3]u64{ 9736379904070620767, 14877674388187150875, 90960814807 },
[3]u64{ 3816238703055069186, 12178961950105734308, 215806520344 },
[3]u64{ 11598915938798661975, 4540604068069253114, 24660222850 },
[3]u64{ 17821633264606555643, 13832478722153359868, 130246146639 },
[3]u64{ 2514623558764574316, 1308046668730371491, 79749860174 },
[3]u64{ 4976730480406253215, 18400531023544756800, 78070909351 },
[3]u64{ 17276563697191611637, 9789823458621466539, 167997494785 },
[3]u64{ 12524734095940998814, 1924870562610267306, 1530707393 },
[3]u64{ 15331551308930355164, 5290016144582400923, 193104347442 },
[3]u64{ 15417115581125943816, 15162883663174059077, 50286772349 },
[3]u64{ 6010750237807115593, 8078086116520046390, 125821981570 },
[3]u64{ 5624630987553628432, 15731407332173190623, 130437913925 },
[3]u64{ 14881848243837640704, 5346389182763011056, 69852801300 },
[3]u64{ 15281613886881529856, 6368422217216252401, 20289828338 },
[3]u64{ 14057902358273196032, 2961453088119116188, 242345232860 },
[3]u64{ 16075318494433902592, 10932141691610170525, 220160540693 },
[3]u64{ 13891916000577716224, 11034016191361782553, 21592632588 },
[3]u64{ 7205759403792793600, 5455325785621453219, 12598155216 },
[3]u64{ 0, 7735615202566149352, 208295733803 },
[3]u64{ 0, 7502396497775759360, 43419348540 },
[3]u64{ 0, 1601286435751591936, 60406705729 },
[3]u64{ 0, 11449383158571597824, 65086805911 },
[3]u64{ 0, 13043944595690356736, 151620672304 },
[3]u64{ 0, 7773494431818186752, 48707113653 },
[3]u64{ 0, 9943947977234055168, 181421401977 },
[3]u64{ 0, 0, 121539062500 },
[3]u64{ 0, 0, 228000000000 },
[3]u64{ 4535831408134330609, 3677, 0 },
[3]u64{ 6204770794376564579, 3677245887913, 0 },
[3]u64{ 13869812122751887467, 6343817245135589714, 199 },
[3]u64{ 14253229412394467550, 17549323075660516085, 199343899021 },
[3]u64{ 12776557610216045332, 3948641822109421754, 141951350710 },
[3]u64{ 16493640728678654060, 1750739713693534543, 182214056302 },
[3]u64{ 9434398296825833151, 962163898128633415, 110094907790 },
[3]u64{ 8773374058285327850, 7967320249386531212, 142052159009 },
[3]u64{ 12932015276748029367, 3018466665533383224, 33431909296 },
[3]u64{ 16293958583527755209, 15076865731854945472, 176163631405 },
[3]u64{ 13511893936143127948, 691187172844604400, 45817318529 },
[3]u64{ 18409936402005226436, 13274492813370992341, 129037469331 },
[3]u64{ 2189663026458466887, 6364168818499152300, 147719611697 },
[3]u64{ 9497725274248154664, 17599380787401914158, 49345002282 },
[3]u64{ 14766925481127792125, 3782323149461692814, 42954064344 },
[3]u64{ 6982373971809635814, 14470163442442237466, 216205040148 },
[3]u64{ 8616702383006884794, 476109872130437939, 20784429132 },
[3]u64{ 3059473300040871066, 16330548844673355700, 76025809967 },
[3]u64{ 17123843157031495558, 14089158961463739563, 47885280826 },
[3]u64{ 11210627174210626524, 13385510793074798805, 58763774837 },
[3]u64{ 15868067138625928592, 1549401308746959012, 117725629994 },
[3]u64{ 4467869511636937589, 4607384943843027435, 42083993213 },
[3]u64{ 10052108125844341766, 5157353797716093483, 125249766838 },
[3]u64{ 7470588003218451534, 10846828782671550129, 182279580709 },
[3]u64{ 2613527085490786280, 9915857350819131531, 37588007766 },
[3]u64{ 3632919450036549616, 1673544973504317923, 86537539704 },
[3]u64{ 179367907231218916, 14780986291622785694, 120090723054 },
[3]u64{ 13553068184555874624, 8168111319515466401, 238801278872 },
[3]u64{ 8798774862365584481, 16345760387859734482, 152442794201 },
[3]u64{ 910911255817064881, 3177475373321281805, 217886105446 },
[3]u64{ 2304331144765093813, 2558676822419554038, 102172251285 },
[3]u64{ 12248937023083640360, 8813474062662382873, 149138706148 },
[3]u64{ 10206039550662130685, 5426294560236228430, 228477779386 },
[3]u64{ 12267881323837852537, 9919177474128333040, 186294160017 },
[3]u64{ 2858642007937891971, 6197383943089627371, 145537719688 },
[3]u64{ 14171330289750320841, 13673239314867423997, 136335960856 },
[3]u64{ 6601103619749017720, 9309584098968723946, 24741227788 },
[3]u64{ 4919573414486739494, 4647101757759615504, 12504673565 },
[3]u64{ 3401998285294974486, 1405809295505096753, 29251919891 },
[3]u64{ 10799436256515532233, 11332704079573859112, 19076209074 },
[3]u64{ 10083786644665753398, 2960072434514044308, 178614347119 },
[3]u64{ 6481194517685688896, 3887266602785432801, 111160465848 },
[3]u64{ 15104161756860547072, 14545546084687849554, 184210729144 },
[3]u64{ 9556039274244079616, 4617763804182385321, 184788515633 },
[3]u64{ 1376343134954323968, 7857823815580249095, 49250329477 },
[3]u64{ 15682488278596976640, 10939326736548364798, 133425973482 },
[3]u64{ 1506454075355430912, 12262012446566951953, 234593022090 },
[3]u64{ 1152921504606846976, 12555024338687723023, 138664725026 },
[3]u64{ 0, 3332969632922829472, 34680609233 },
[3]u64{ 0, 15535060143360327680, 209180680645 },
[3]u64{ 0, 15794322927987458048, 197842157297 },
[3]u64{ 0, 10571474314433921024, 241856211961 },
[3]u64{ 0, 16679514427547975680, 249573080770 },
[3]u64{ 0, 16925653299565166592, 194904198288 },
[3]u64{ 0, 16717361816799281152, 144917541503 },
[3]u64{ 0, 0, 127906250000 },
[3]u64{ 0, 0, 16000000000 },
[3]u64{ 6172559441576707976, 56110319, 0 },
[3]u64{ 15083329738554729992, 56110319334615117, 0 },
[3]u64{ 10013126833549229036, 9335385384027907407, 3041746 },
[3]u64{ 5817156823499936061, 13237828406194798613, 210506072255 },
[3]u64{ 5282692560913632718, 15667486867836528863, 191717624115 },
[3]u64{ 10252307034225766362, 17982325043592934313, 51849336164 },
[3]u64{ 17981881283247669689, 17159117626917379189, 100974823793 },
[3]u64{ 11689290159733383293, 8336208968408929657, 113930197630 },
[3]u64{ 5530668968487988249, 12767090573379150201, 126451906793 },
[3]u64{ 10083765740821947024, 14736070002412246709, 233692105366 },
[3]u64{ 2798423656816843533, 9697296975344560756, 150798843955 },
[3]u64{ 7614494481582904797, 7291706381199103298, 51525691522 },
[3]u64{ 17811318500083423695, 18098546597780825068, 130395284194 },
[3]u64{ 11641467412200329033, 132913902678533478, 226981124177 },
[3]u64{ 17733593025296340645, 1879347741692007580, 81007205277 },
[3]u64{ 3689424000190644835, 4056624629214083684, 157101879645 },
[3]u64{ 14966634145516728506, 14713227692042795499, 93219910061 },
[3]u64{ 14171681941562070109, 7366415124022528526, 173797605671 },
[3]u64{ 8130575762882608170, 825770353378039393, 39399334164 },
[3]u64{ 5234550794400656856, 10244023944395357795, 20044765100 },
[3]u64{ 3020576149360486378, 14302658294713551167, 172555329650 },
[3]u64{ 3038675756589057221, 14246653166206862817, 114775348659 },
[3]u64{ 15470260187120878369, 12404486258134291102, 179772312615 },
[3]u64{ 3497929414841828746, 8887442218637942533, 39672448547 },
[3]u64{ 9935840636861015305, 1186724038081863005, 35481789208 },
[3]u64{ 3647355485153741471, 211331772484951576, 24064332439 },
[3]u64{ 766100215038272793, 6311919513247413649, 151011456318 },
[3]u64{ 16128087474216800751, 8131780018703965703, 62342169842 },
[3]u64{ 16216631732633731297, 2262544347226725725, 242440824678 },
[3]u64{ 13760220872779997335, 15318188749880522583, 102122652774 },
[3]u64{ 3826276262374222087, 1073117094162650652, 102830400676 },
[3]u64{ 14938032745839181005, 4447950380665871747, 164058173794 },
[3]u64{ 14479259995009508865, 5373227185066463609, 98241123873 },
[3]u64{ 2372033248156102437, 6739731406934274193, 33291283229 },
[3]u64{ 792005346826701645, 12328812617001239444, 29365361571 },
[3]u64{ 16278924527931792559, 3246111484407310759, 163668346271 },
[3]u64{ 17442516423538940144, 3250825415176839770, 159175972056 },
[3]u64{ 13844184233048446, 16146270540000862342, 216176227598 },
[3]u64{ 13486193870480782357, 15686773375425916830, 14875291079 },
[3]u64{ 11931315179184648737, 11920791905793880226, 199850381688 },
[3]u64{ 16492562205587485405, 1853290561644080707, 120646227424 },
[3]u64{ 12128987217680380854, 12157689141506159076, 224100467082 },
[3]u64{ 10568123814189138176, 18100318838862562546, 138659069648 },
[3]u64{ 17007583519117541376, 7171257882533475139, 208981220250 },
[3]u64{ 143791533903052800, 14477550873015039462, 154388754668 },
[3]u64{ 12398714235792654336, 8109481182495403274, 236784829605 },
[3]u64{ 9659957317919047680, 14565395719337663965, 165439615855 },
[3]u64{ 9412523221204336640, 1860318978161305991, 111789591684 },
[3]u64{ 4611686018427387904, 16268646275151585618, 132100848093 },
[3]u64{ 0, 13759019338835519104, 221881925081 },
[3]u64{ 0, 17003783176010661888, 217745877932 },
[3]u64{ 0, 18357489540307877888, 172921776932 },
[3]u64{ 0, 905481790074912768, 36995161502 },
[3]u64{ 0, 3638882110636294144, 158049086266 },
[3]u64{ 0, 9011702854368362496, 58197264194 },
[3]u64{ 0, 11529215046068469760, 66488525390 },
[3]u64{ 0, 0, 78625000000 },
[3]u64{ 0, 0, 64000000000 },
[3]u64{ 3237900842885170729, 856, 0 },
[3]u64{ 7515893506498066595, 856175526956, 0 },
[3]u64{ 7300206309181072546, 7625299565768063067, 46 },
[3]u64{ 5999737279837044, 13889021769065194705, 46413368317 },
[3]u64{ 7556839307242450651, 14498170692313014398, 253752925378 },
[3]u64{ 12946035041643640643, 1541631360972245751, 194785947408 },
[3]u64{ 15885877642352740665, 9903958882920799117, 16083572003 },
[3]u64{ 10770818348246089568, 15744148547788062576, 35536894686 },
[3]u64{ 11635415503599551744, 17936061801321712000, 222853492002 },
[3]u64{ 6248053924100826098, 9986394078324430610, 34972315858 },
[3]u64{ 16894170802729859998, 13849561248103430369, 210541363507 },
[3]u64{ 6143589029651889899, 12142378807953854930, 51750786219 },
[3]u64{ 11812087701837886160, 2513847703931031444, 171658239674 },
[3]u64{ 7306705080150829180, 1752183758129038045, 186136275957 },
[3]u64{ 1485332570280714274, 15824833342220556540, 245094986071 },
[3]u64{ 18042602303295630634, 8168747198299470695, 87857865934 },
[3]u64{ 13397029889257074369, 17414799840149357478, 206442828672 },
[3]u64{ 9948104869613411488, 83147520704167789, 128944058191 },
[3]u64{ 10836066241170646532, 2383542703041471269, 79004507436 },
[3]u64{ 18330574781234459389, 15540952725549257799, 44129212108 },
[3]u64{ 666297360208433062, 6949835416232048690, 204842476735 },
[3]u64{ 5035352224889324309, 15398868937585367540, 191376751332 },
[3]u64{ 1341745796439923765, 14710915985268256079, 228834774357 },
[3]u64{ 6846932182653803785, 9665704836873335737, 85797480353 },
[3]u64{ 6727685027257825533, 2528789298740305993, 161523978909 },
[3]u64{ 2168538874806877737, 10562914675687726264, 157137085942 },
[3]u64{ 17694936100676971444, 17671658300096837111, 246572616751 },
[3]u64{ 2163944241059563294, 356471401631698552, 47957982516 },
[3]u64{ 6727780864524301558, 7450677157218003204, 52019324353 },
[3]u64{ 8599551977795002615, 317174560787152643, 193403902018 },
[3]u64{ 15428264807806859091, 7251937674440720374, 66017194067 },
[3]u64{ 2126771385339683557, 1252631516699038247, 83393128329 },
[3]u64{ 15094316562082972944, 10818009768860843867, 137067905290 },
[3]u64{ 8111300598225956802, 12330114194950162396, 10586445484 },
[3]u64{ 9481215200564260304, 15826681638261168822, 172668416829 },
[3]u64{ 16836674128623424708, 14240150078499211625, 61857966130 },
[3]u64{ 7087243115299722740, 10725372116242125421, 50771960082 },
[3]u64{ 2343560867338408810, 8434925524647833627, 18581423587 },
[3]u64{ 3431385749090422286, 17133902668520348241, 227457258228 },
[3]u64{ 3504545517469224582, 15093996047981365810, 244928830724 },
[3]u64{ 3333759805712094227, 6187974166976813153, 4818247165 },
[3]u64{ 3595183476205994775, 13946144707720259865, 253335450751 },
[3]u64{ 14191566632569921303, 9138079832881862582, 127756022019 },
[3]u64{ 12917427671358095562, 6600697628576225568, 3495376300 },
[3]u64{ 3883793922738316288, 8137099536646556597, 172357824535 },
[3]u64{ 7857281689266421760, 14169855543453903706, 23441113049 },
[3]u64{ 15987081651486195712, 3706403268650100765, 217768149408 },
[3]u64{ 16827562156399525888, 14736932266877982264, 160200924523 },
[3]u64{ 7012737938513461248, 18004795125138956004, 107798890698 },
[3]u64{ 7385903388887613440, 9068489270661002501, 202976041899 },
[3]u64{ 0, 7758835715193269217, 171491603788 },
[3]u64{ 0, 16943947811135261184, 76420607326 },
[3]u64{ 0, 6745843108403216384, 94918533251 },
[3]u64{ 0, 12338229654069444608, 131365692887 },
[3]u64{ 0, 14358176069683511296, 215668856769 },
[3]u64{ 0, 7083775185760813056, 193778358284 },
[3]u64{ 0, 5350276357316149248, 12384012222 },
[3]u64{ 0, 9223372036854775808, 190290039062 },
[3]u64{ 0, 0, 22500000000 },
[3]u64{ 14135788013842776187, 13064201, 0 },
[3]u64{ 13284322918167594445, 13064201766302603, 0 },
[3]u64{ 7264587765474046287, 14699116688460625612, 708211 },
[3]u64{ 16176482219778368741, 6684126021499623499, 115796840712 },
[3]u64{ 5401983818872095469, 12614606079692508506, 8362347197 },
[3]u64{ 11208857446851049921, 15358270276683001489, 189683839165 },
[3]u64{ 13794690008281035639, 18077126190953408995, 189832573499 },
[3]u64{ 14519782740993303071, 7864121581925945659, 59979962974 },
[3]u64{ 10885858587044789123, 3518026639210514839, 94426314885 },
[3]u64{ 8710500938899914621, 4698310163811252280, 133190712606 },
[3]u64{ 1284182587483102819, 6101155398200416338, 30254695904 },
[3]u64{ 10346074482131502030, 16049178580360033341, 224330744296 },
[3]u64{ 9429804686255246574, 3167464649127375997, 232870027714 },
[3]u64{ 6412022633845121254, 12778923935480989904, 194171708602 },
[3]u64{ 8892351297529018260, 11875553912612980379, 186692746854 },
[3]u64{ 14098160105983060597, 10628760849351697057, 102643775067 },
[3]u64{ 13793833029739474340, 3408944711673234310, 91576186280 },
[3]u64{ 16367653765996977044, 2102091496050506178, 168184799263 },
[3]u64{ 10684788343333772342, 6254611118630245760, 31113954608 },
[3]u64{ 13272681218705145345, 2647941151989776368, 48339063148 },
[3]u64{ 11093568615497829248, 8855437735410157458, 108143545177 },
[3]u64{ 12488220765137758124, 10184270603132180103, 89480054241 },
[3]u64{ 3727114642519696453, 12079083162535627164, 225552090415 },
[3]u64{ 11549865375695057514, 5952952868716156729, 47654808410 },
[3]u64{ 11292809154908783229, 11958907037815852320, 90322710221 },
[3]u64{ 17723904861837310998, 10101562137321697626, 205648293649 },
[3]u64{ 14877674388187150875, 13633527411279258327, 17547606780 },
[3]u64{ 12178961950105734308, 16555627393501768728, 252739075001 },
[3]u64{ 4540604068069253114, 6359650463500280706, 185897482359 },
[3]u64{ 13832478722153359868, 8093923611102181967, 119344757342 },
[3]u64{ 1308046668730371491, 2848827352928635726, 94438772478 },
[3]u64{ 18400531023544756800, 4686723431961561511, 254154435240 },
[3]u64{ 9789823458621466539, 6245554925867652609, 168254067786 },
[3]u64{ 1924870562610267306, 17527406820792516033, 74338572210 },
[3]u64{ 5290016144582400923, 12119966834653692210, 178950162627 },
[3]u64{ 15162883663174059077, 11606502845877928061, 195657024718 },
[3]u64{ 8078086116520046390, 424311496652297090, 206629189780 },
[3]u64{ 15731407332173190623, 5977664048034127173, 148023001972 },
[3]u64{ 5346389182763011056, 6702712461535947028, 116324049817 },
[3]u64{ 6368422217216252401, 11384349854055020018, 153363354770 },
[3]u64{ 2961453088119116188, 3782955013294836188, 146617146842 },
[3]u64{ 10932141691610170525, 3531805968821207061, 218205074402 },
[3]u64{ 11034016191361782553, 3867566898657193228, 226191459585 },
[3]u64{ 5455325785621453219, 12688734637425072080, 1209661221 },
[3]u64{ 7735615202566149352, 18435982764454619691, 37687857682 },
[3]u64{ 7502396497775759360, 4728836163964677692, 18999416628 },
[3]u64{ 1601286435751591936, 2120012917348838977, 52256350722 },
[3]u64{ 11449383158571597824, 9856965465824679831, 2114926130 },
[3]u64{ 13043944595690356736, 11217197671061248816, 50534347168 },
[3]u64{ 7773494431818186752, 3840562972677739189, 160608085504 },
[3]u64{ 9943947977234055168, 17104366978925258617, 208197335 },
[3]u64{ 0, 16177877219841993444, 215927229591 },
[3]u64{ 0, 7338522384267208704, 151877004481 },
[3]u64{ 0, 10935240458612244480, 193397822095 },
[3]u64{ 0, 1732868046462124032, 143592800573 },
[3]u64{ 0, 557965042578882560, 61093938965 },
[3]u64{ 0, 10454684322475540480, 21030247345 },
[3]u64{ 0, 13907115649320091648, 177566749572 },
[3]u64{ 0, 0, 132753906250 },
[3]u64{ 0, 0, 74000000000 },
[3]u64{ 6343817245135589714, 199, 0 },
[3]u64{ 17549323075660516085, 199343899021, 0 },
[3]u64{ 3948641822109421754, 14876458284855834550, 10 },
[3]u64{ 1750739713693534543, 10450704926982265198, 10806454419 },
[3]u64{ 962163898128633415, 5385653213018257806, 147566533849 },
[3]u64{ 7967320249386531212, 12735569669880147489, 217291956845 },
[3]u64{ 3018466665533383224, 3619762560577729456, 109690396615 },
[3]u64{ 15076865731854945472, 11123448126624084269, 199196227721 },
[3]u64{ 691187172844604400, 4072715118852885633, 137603003331 },
[3]u64{ 13274492813370992341, 18239087231420827283, 195220782328 },
[3]u64{ 6364168818499152300, 423431461216085297, 248988742900 },
[3]u64{ 17599380787401914158, 9360976716520160042, 244022954265 },
[3]u64{ 3782323149461692814, 11655927117263208920, 25507459564 },
[3]u64{ 14470163442442237466, 2646622721938364948, 236631869075 },
[3]u64{ 476109872130437939, 4496462484548171852, 147143473705 },
[3]u64{ 16330548844673355700, 13140258519803350063, 41243753719 },
[3]u64{ 14089158961463739563, 13089764333320627770, 247712334841 },
[3]u64{ 13385510793074798805, 6926286827289840501, 249709597546 },
[3]u64{ 1549401308746959012, 4985580225290866218, 106375474761 },
[3]u64{ 4607384943843027435, 10478790837359789693, 73270268845 },
[3]u64{ 5157353797716093483, 10041191967455692214, 173568056389 },
[3]u64{ 10846828782671550129, 5035461258013813797, 69544334107 },
[3]u64{ 9915857350819131531, 14208759661559249750, 27272972901 },
[3]u64{ 1673544973504317923, 12347272163241758840, 101770258404 },
[3]u64{ 14780986291622785694, 3372534174410277614, 228669346965 },
[3]u64{ 8168111319515466401, 17226704187274712984, 149182825443 },
[3]u64{ 16345760387859734482, 4250480179449852121, 227933861505 },
[3]u64{ 3177475373321281805, 4303723537755414374, 129230418992 },
[3]u64{ 2558676822419554038, 8680503847344854165, 48233305320 },
[3]u64{ 8813474062662382873, 8817608623911079652, 232470571056 },
[3]u64{ 5426294560236228430, 5692030448698539450, 48478003521 },
[3]u64{ 9919177474128333040, 16908836314686769809, 65308565588 },
[3]u64{ 6197383943089627371, 6073762347067727240, 84916629853 },
[3]u64{ 13673239314867423997, 10931066692585106200, 93329259316 },
[3]u64{ 9309584098968723946, 14466591364061539596, 52592574312 },
[3]u64{ 4647101757759615504, 4958077340960173341, 104784235489 },
[3]u64{ 1405809295505096753, 4076890037156765715, 225268777911 },
[3]u64{ 11332704079573859112, 14083973146609179058, 183221008651 },
[3]u64{ 2960072434514044308, 2565183738039805295, 11763493714 },
[3]u64{ 3887266602785432801, 1482420938751351224, 82139058889 },
[3]u64{ 14545546084687849554, 2151089495335413944, 201080362200 },
[3]u64{ 4617763804182385321, 3738604531753220913, 216116610795 },
[3]u64{ 7857823815580249095, 14195686514836005765, 235202670157 },
[3]u64{ 10939326736548364798, 17808833916231796970, 77769549707 },
[3]u64{ 12262012446566951953, 1302384553035657354, 139965418821 },
[3]u64{ 12555024338687723023, 1672033517974833698, 69070602408 },
[3]u64{ 3332969632922829472, 11673925532927662545, 168090641118 },
[3]u64{ 15535060143360327680, 3905334232240480709, 222632844771 },
[3]u64{ 15794322927987458048, 17411087320267472625, 227211708592 },
[3]u64{ 10571474314433921024, 16573305231063706617, 176943856934 },
[3]u64{ 16679514427547975680, 15481103236037148354, 38898440676 },
[3]u64{ 16925653299565166592, 907440704754420880, 228839232288 },
[3]u64{ 16717361816799281152, 3224970785139077759, 32049192459 },
[3]u64{ 0, 10560826509734608144, 11174826016 },
[3]u64{ 0, 4700940027512659968, 32572503552 },
[3]u64{ 0, 9733694683502084096, 254838469 },
[3]u64{ 0, 1995535635724632064, 197527664646 },
[3]u64{ 0, 10629833226245373952, 6108178203 },
[3]u64{ 0, 15729384648544878592, 27576244413 },
[3]u64{ 0, 7205759403792793600, 189852691650 },
[3]u64{ 0, 0, 194390625000 },
[3]u64{ 0, 0, 232000000000 },
[3]u64{ 9335385384027907407, 3041746, 0 },
[3]u64{ 13237828406194798613, 3041746506072255, 0 },
[3]u64{ 15667486867836528863, 7535526066623007027, 164893 },
[3]u64{ 17982325043592934313, 11302146918409311588, 29408501686 },
[3]u64{ 17159117626917379189, 2480833299122194801, 182612690612 },
[3]u64{ 8336208968408929657, 11513226205589330558, 180134486242 },
[3]u64{ 12767090573379150201, 4073957068281936105, 226624133243 },
[3]u64{ 14736070002412246709, 3729887061093812886, 123220849655 },
[3]u64{ 9697296975344560756, 13616911779739451443, 247202197582 },
[3]u64{ 7291706381199103298, 13039053282195777666, 78738174266 },
[3]u64{ 18098546597780825068, 14490756113210417890, 58706848494 },
[3]u64{ 132913902678533478, 17432486112977557585, 238785545462 },
[3]u64{ 1879347741692007580, 14308820825344039837, 246945016965 },
[3]u64{ 4056624629214083684, 4190949538817536349, 133775682731 },
[3]u64{ 14713227692042795499, 13616552502810964397, 171227191829 },
[3]u64{ 7366415124022528526, 4898145803694965031, 21738154790 },
[3]u64{ 825770353378039393, 1399036321001644308, 38265529016 },
[3]u64{ 10244023944395357795, 17170331128243738540, 184075841910 },
[3]u64{ 14302658294713551167, 10641321388205367410, 118930805515 },
[3]u64{ 14246653166206862817, 6648873641312572851, 11576867188 },
[3]u64{ 12404486258134291102, 5988456964560374823, 116360436162 },
[3]u64{ 8887442218637942533, 9972593758348346915, 194324634902 },
[3]u64{ 1186724038081863005, 16709668921872818968, 22540615390 },
[3]u64{ 211331772484951576, 6094829131503407767, 222905832967 },
[3]u64{ 6311919513247413649, 4892016478899926334, 7330401349 },
[3]u64{ 8131780018703965703, 13150857244079031538, 69265196744 },
[3]u64{ 2262544347226725725, 12983943395318785894, 200712909399 },
[3]u64{ 15318188749880522583, 15341644584614757478, 87703860981 },
[3]u64{ 1073117094162650652, 7507635124856644772, 245831672219 },
[3]u64{ 4447950380665871747, 11619655367084544354, 155406989715 },
[3]u64{ 5373227185066463609, 11553116952478783009, 147629902779 },
[3]u64{ 6739731406934274193, 17392150014233193245, 187626295724 },
[3]u64{ 12328812617001239444, 8877887560294980515, 172942830341 },
[3]u64{ 3246111484407310759, 18404180619915609503, 5481271248 },
[3]u64{ 3250825415176839770, 10079413095288181976, 208997692630 },
[3]u64{ 16146270540000862342, 14102802966539105550, 214546406078 },
[3]u64{ 15686773375425916830, 13333966026135891399, 190764514480 },
[3]u64{ 11920791905793880226, 12344968670173516152, 176722835746 },
[3]u64{ 1853290561644080707, 10577007819804726752, 34669222092 },
[3]u64{ 12157689141506159076, 15337041354031088010, 204573380742 },
[3]u64{ 18100318838862562546, 14333607285614673616, 134831422677 },
[3]u64{ 7171257882533475139, 17171597563219696538, 213777026407 },
[3]u64{ 14477550873015039462, 2849642930482147564, 103930874169 },
[3]u64{ 8109481182495403274, 14791248423979435173, 57154479452 },
[3]u64{ 14565395719337663965, 13882371364576310127, 92801835183 },
[3]u64{ 1860318978161305991, 11735995808941329540, 175752564859 },
[3]u64{ 16268646275151585618, 11376996674339273181, 123636209607 },
[3]u64{ 13759019338835519104, 9849638057168043481, 199616748225 },
[3]u64{ 17003783176010661888, 18241520229279361964, 193533949948 },
[3]u64{ 18357489540307877888, 1865852368526961444, 252988874793 },
[3]u64{ 905481790074912768, 10601487369276448158, 41101148059 },
[3]u64{ 3638882110636294144, 15999931310312762170, 155574707781 },
[3]u64{ 9011702854368362496, 5773775867713013570, 69867358014 },
[3]u64{ 11529215046068469760, 17726239863982547534, 62312997016 },
[3]u64{ 0, 9711316695888316992, 152960941388 },
[3]u64{ 0, 17872002620723724288, 76526451532 },
[3]u64{ 0, 7429694208660733952, 76968843203 },
[3]u64{ 0, 1782821038871019520, 195402764530 },
[3]u64{ 0, 3225250234313474048, 242096646922 },
[3]u64{ 0, 10009250171830927360, 10174841165 },
[3]u64{ 0, 1152921504606846976, 77542602539 },
[3]u64{ 0, 0, 43062500000 },
[3]u64{ 0, 0, 160000000000 },
[3]u64{ 7625299565768063067, 46, 0 },
[3]u64{ 13889021769065194705, 46413368317, 0 },
[3]u64{ 14498170692313014398, 9519880170333822146, 2 },
[3]u64{ 1541631360972245751, 2285186318012886800, 2516073738 },
[3]u64{ 9903958882920799117, 9706420951402272035, 10123880198 },
[3]u64{ 15744148547788062576, 2369632031840402142, 6526186134 },
[3]u64{ 17936061801321712000, 15599123897979399458, 150128458009 },
[3]u64{ 9986394078324430610, 17579576584023912658, 25845630200 },
[3]u64{ 13849561248103430369, 3480927339588501811, 248952990756 },
[3]u64{ 12142378807953854930, 3547346616671294635, 36188701449 },
[3]u64{ 2513847703931031444, 7705317123868384954, 9192302045 },
[3]u64{ 1752183758129038045, 4969425237478353909, 221417706078 },
[3]u64{ 15824833342220556540, 17043246700132217175, 94269393081 },
[3]u64{ 8168747198299470695, 17053788362783499470, 185923916254 },
[3]u64{ 17414799840149357478, 11102988228454224768, 222924487719 },
[3]u64{ 83147520704167789, 16944305387801685839, 39601894197 },
[3]u64{ 2383542703041471269, 11725142977459199276, 53918552635 },
[3]u64{ 15540952725549257799, 8175984171998533324, 59635621274 },
[3]u64{ 6949835416232048690, 1372352885142856895, 154443220990 },
[3]u64{ 15398868937585367540, 17975093466502888164, 254074395398 },
[3]u64{ 14710915985268256079, 6467823391459085653, 6974431769 },
[3]u64{ 9665704836873335737, 11319386883146885025, 25350621408 },
[3]u64{ 2528789298740305993, 9141999262922068637, 224613625192 },
[3]u64{ 10562914675687726264, 1587330393383478774, 104495588773 },
[3]u64{ 17671658300096837111, 884187548095712303, 165086049353 },
[3]u64{ 356471401631698552, 488841225726377268, 73047931903 },
[3]u64{ 7450677157218003204, 17462624199405856193, 255026500135 },
[3]u64{ 317174560787152643, 13183677579115583554, 39946650754 },
[3]u64{ 7251937674440720374, 11645015818917277779, 130714688593 },
[3]u64{ 1252631516699038247, 8760523002035971977, 81631277572 },
[3]u64{ 10818009768860843867, 10068817678491468042, 4474908903 },
[3]u64{ 12330114194950162396, 1273658177787418284, 231545831700 },
[3]u64{ 15826681638261168822, 3100019384328057661, 20069045148 },
[3]u64{ 14240150078499211625, 10363063568089458738, 156168052387 },
[3]u64{ 10725372116242125421, 13030756371481403666, 163561782801 },
[3]u64{ 8434925524647833627, 6538878900684195299, 17706398718 },
[3]u64{ 17133902668520348241, 8984884716779098868, 254354473335 },
[3]u64{ 15093996047981365810, 8728727397070363908, 119487071576 },
[3]u64{ 6187974166976813153, 6398650562917867005, 88473185260 },
[3]u64{ 13946144707720259865, 1190873176164938879, 236346871542 },
[3]u64{ 9138079832881862582, 4383628525805121795, 246064557364 },
[3]u64{ 6600697628576225568, 10189374699734119852, 52237636978 },
[3]u64{ 8137099536646556597, 5276291920541626391, 114552367109 },
[3]u64{ 14169855543453903706, 2692252373800386521, 5286028358 },
[3]u64{ 3706403268650100765, 11578684995169173920, 70145947293 },
[3]u64{ 14736932266877982264, 5799408022254132587, 157627681771 },
[3]u64{ 18004795125138956004, 15548569837712345290, 235314386538 },
[3]u64{ 9068489270661002501, 15763030464322902955, 106842889659 },
[3]u64{ 7758835715193269217, 13257749746581255500, 187854515593 },
[3]u64{ 16943947811135261184, 16152470009188707678, 137718704053 },
[3]u64{ 6745843108403216384, 13806790848493904003, 181875627153 },
[3]u64{ 12338229654069444608, 11981226523265951191, 145748467631 },
[3]u64{ 14358176069683511296, 5133628726077003713, 175649503591 },
[3]u64{ 7083775185760813056, 16183955741910833164, 103278294570 },
[3]u64{ 5350276357316149248, 13640425554331371454, 42877333998 },
[3]u64{ 9223372036854775808, 18108120906868035862, 238739448950 },
[3]u64{ 0, 6324011669895037184, 118981643201 },
[3]u64{ 0, 10444437689515769856, 193342825359 },
[3]u64{ 0, 12324712543665782784, 143566194101 },
[3]u64{ 0, 13928941951563857920, 181668124005 },
[3]u64{ 0, 3975288688270639104, 101755089456 },
[3]u64{ 0, 11141905478114607104, 48215500831 },
[3]u64{ 0, 4611686018427387904, 31604003906 },
[3]u64{ 0, 0, 66250000000 },
[3]u64{ 0, 0, 128000000000 },
[3]u64{ 14699116688460625612, 708211, 0 },
[3]u64{ 6684126021499623499, 708211796840712, 0 },
[3]u64{ 12614606079692508506, 4398362855256705725, 38392 },
[3]u64{ 15358270276683001489, 2812083125569302717, 248238435728 },
[3]u64{ 18077126190953408995, 12868509142973100603, 144152443331 },
[3]u64{ 7864121581925945659, 8726243776748165726, 195697603278 },
[3]u64{ 3518026639210514839, 358304413426858117, 206473050623 },
[3]u64{ 4698310163811252280, 3180720351566429470, 255019423721 },
[3]u64{ 6101155398200416338, 14053818240400098784, 233172427195 },
[3]u64{ 16049178580360033341, 7340140541492429288, 187761859013 },
[3]u64{ 3167464649127375997, 1323571167904965058, 197397909816 },
[3]u64{ 12778923935480989904, 14463851737583396026, 56071750936 },
[3]u64{ 11875553912612980379, 15122784818916048486, 24784086973 },
[3]u64{ 10628760849351697057, 13557974621377508955, 189819807807 },
[3]u64{ 3408944711673234310, 17525172074563876264, 63734979276 },
[3]u64{ 2102091496050506178, 15148880683074215967, 204950041481 },
[3]u64{ 6254611118630245760, 6744828147558597936, 137821222467 },
[3]u64{ 2647941151989776368, 9799290779647971692, 67365637866 },
[3]u64{ 8855437735410157458, 11170890203898678105, 234531220617 },
[3]u64{ 10184270603132180103, 7068779781287527905, 137605575171 },
[3]u64{ 12079083162535627164, 14474741922505540911, 3383199319 },
[3]u64{ 5952952868716156729, 17107062680405191514, 87784677331 },
[3]u64{ 11958907037815852320, 2712598571300237005, 211927375726 },
[3]u64{ 10101562137321697626, 3767556054903418641, 110147050263 },
[3]u64{ 13633527411279258327, 18158239681706277628, 23204239622 },
[3]u64{ 16555627393501768728, 10531652712128330681, 6984360145 },
[3]u64{ 6359650463500280706, 9548395326934120567, 209570922037 },
[3]u64{ 8093923611102181967, 15875647850297719390, 53517619547 },
[3]u64{ 2848827352928635726, 8215825295203192574, 91860620594 },
[3]u64{ 4686723431961561511, 12747310908260543144, 50445380781 },
[3]u64{ 6245554925867652609, 77706528053613642, 173691033109 },
[3]u64{ 17527406820792516033, 6024737704056756146, 21004212479 },
[3]u64{ 12119966834653692210, 6819452388570089667, 255326601685 },
[3]u64{ 11606502845877928061, 13695926775373186254, 213369683254 },
[3]u64{ 424311496652297090, 3746531715392682132, 54742457678 },
[3]u64{ 5977664048034127173, 4717376233154528116, 78203099891 },
[3]u64{ 6702712461535947028, 385190957950313369, 243255729478 },
[3]u64{ 11384349854055020018, 12388374310648616082, 70020881243 },
[3]u64{ 3782955013294836188, 1078067332084407770, 91671575117 },
[3]u64{ 3531805968821207061, 3257295319358714850, 77058442147 },
[3]u64{ 3867566898657193228, 1545453099660723457, 163176578333 },
[3]u64{ 12688734637425072080, 7495477664653506341, 29083779180 },
[3]u64{ 18435982764454619691, 7225503732673614354, 108406330658 },
[3]u64{ 4728836163964677692, 3935478326103643956, 34391695342 },
[3]u64{ 2120012917348838977, 10082240682742686210, 238213342707 },
[3]u64{ 9856965465824679831, 10838712705567897138, 243546559362 },
[3]u64{ 11217197671061248816, 2142546572501643680, 130587567793 },
[3]u64{ 3840562972677739189, 7893042119150331392, 177116147682 },
[3]u64{ 17104366978925258617, 12084811642251302615, 226427882670 },
[3]u64{ 16177877219841993444, 15317234482572954775, 174655118951 },
[3]u64{ 7338522384267208704, 2283226355108359361, 103830348945 },
[3]u64{ 10935240458612244480, 13359725152575722127, 145123773948 },
[3]u64{ 1732868046462124032, 13126551011491594557, 252724232151 },
[3]u64{ 557965042578882560, 3598021288691861269, 215711591756 },
[3]u64{ 10454684322475540480, 16462621795896662961, 76195049124 },
[3]u64{ 13907115649320091648, 14682112756964627332, 164892440515 },
[3]u64{ 0, 7174112100896070218, 195795918927 },
[3]u64{ 0, 5023109019590616064, 79388909396 },
[3]u64{ 0, 10765223023086141440, 84272303285 },
[3]u64{ 0, 8228137177297453056, 181583583909 },
[3]u64{ 0, 2891199497780592640, 165446048210 },
[3]u64{ 0, 15294857653247803392, 210156732238 },
[3]u64{ 0, 14303432416528695296, 78829135894 },
[3]u64{ 0, 0, 22775390625 },
[3]u64{ 0, 0, 161000000000 },
[3]u64{ 14876458284855834550, 10, 0 },
[3]u64{ 10450704926982265198, 10806454419, 0 },
[3]u64{ 5385653213018257806, 10806454419566533849, 0 },
[3]u64{ 12735569669880147489, 17118225092618494573, 585819067 },
[3]u64{ 3619762560577729456, 13385738875341807559, 187927980841 },
[3]u64{ 11123448126624084269, 8272682717439277193, 41725642358 },
[3]u64{ 4072715118852885633, 13402436483369350083, 118448463028 },
[3]u64{ 18239087231420827283, 10946328903241612536, 180726547537 },
[3]u64{ 423431461216085297, 16265808923426731252, 81593401678 },
[3]u64{ 9360976716520160042, 11080374459871185177, 78881771268 },
[3]u64{ 11655927117263208920, 1240761893433831916, 4600668303 },
[3]u64{ 2646622721938364948, 367264070493390483, 143067261837 },
[3]u64{ 4496462484548171852, 2863675693461092905, 141019909425 },
[3]u64{ 13140258519803350063, 7511929581752138999, 49155240170 },
[3]u64{ 13089764333320627770, 11154557789993845753, 234407222518 },
[3]u64{ 6926286827289840501, 8325416539745948522, 246604689789 },
[3]u64{ 4985580225290866218, 17745129874679852617, 125451321734 },
[3]u64{ 10478790837359789693, 1074820986392253357, 134961965418 },
[3]u64{ 10041191967455692214, 7820952682162838597, 106058266162 },
[3]u64{ 5035461258013813797, 8215518006273528603, 50423974694 },
[3]u64{ 14208759661559249750, 9680426791089900133, 38445364123 },
[3]u64{ 12347272163241758840, 16128495723604797412, 155524776987 },
[3]u64{ 3372534174410277614, 2264789053583348885, 27874327505 },
[3]u64{ 17226704187274712984, 11175458488686298083, 209122774460 },
[3]u64{ 4250480179449852121, 11026777810412287617, 188605822818 },
[3]u64{ 4303723537755414374, 16199890034895598640, 98597762822 },
[3]u64{ 8680503847344854165, 9094320719494763752, 6878197798 },
[3]u64{ 8817608623911079652, 1250835564687222832, 38493004114 },
[3]u64{ 5692030448698539450, 15362466642459337025, 82067807931 },
[3]u64{ 16908836314686769809, 7831109835595423828, 187832800985 },
[3]u64{ 6073762347067727240, 15426237284335022429, 217424525314 },
[3]u64{ 10931066692585106200, 15636308361455434548, 2836257998 },
[3]u64{ 14466591364061539596, 13967173875944980328, 206847645974 },
[3]u64{ 4958077340960173341, 18245979923595824097, 22757162012 },
[3]u64{ 4076890037156765715, 11335054479675278263, 28989116553 },
[3]u64{ 14083973146609179058, 11165339882630461707, 137614474534 },
[3]u64{ 2565183738039805295, 15944437408299395922, 38605274287 },
[3]u64{ 1482420938751351224, 15806416348777321161, 175864349683 },
[3]u64{ 2151089495335413944, 4201030477408556248, 243856867547 },
[3]u64{ 3738604531753220913, 9485474942554588907, 219227738318 },
[3]u64{ 14195686514836005765, 18238757647663230541, 206514208626 },
[3]u64{ 17808833916231796970, 4642199687824746379, 114988725033 },
[3]u64{ 1302384553035657354, 6134575894869364037, 41251654149 },
[3]u64{ 1672033517974833698, 11524208547121316008, 5332556025 },
[3]u64{ 11673925532927662545, 2734683241527878366, 249624728597 },
[3]u64{ 3905334232240480709, 10629223456178675171, 21148247475 },
[3]u64{ 17411087320267472625, 2788042336985254064, 179576211358 },
[3]u64{ 16573305231063706617, 17285498758066142502, 158151140077 },
[3]u64{ 15481103236037148354, 5525538192421886436, 237937048765 },
[3]u64{ 907440704754420880, 11414325503043801888, 189299540025 },
[3]u64{ 3224970785139077759, 7246608114685173259, 57618771825 },
[3]u64{ 10560826509734608144, 1007884269852184608, 113392839413 },
[3]u64{ 4700940027512659968, 13823717876510029312, 245054637515 },
[3]u64{ 9733694683502084096, 12487410768239429317, 203749385247 },
[3]u64{ 1995535635724632064, 3361062421598631942, 31676943894 },
[3]u64{ 10629833226245373952, 17853337379088328475, 22182203558 },
[3]u64{ 15729384648544878592, 11551561037491869885, 166967831358 },
[3]u64{ 7205759403792793600, 11480877996635204802, 62626211378 },
[3]u64{ 0, 5527488381934471912, 50622379643 },
[3]u64{ 0, 11143438404407726080, 123299645745 },
[3]u64{ 0, 6472279730688098304, 49604087006 },
[3]u64{ 0, 4561816853579563008, 222350862987 },
[3]u64{ 0, 2888714464062865408, 139247296587 },
[3]u64{ 0, 16258276129784201216, 75156597524 },
[3]u64{ 0, 720575940379279360, 20881362915 },
[3]u64{ 0, 0, 227039062500 },
[3]u64{ 0, 0, 228000000000 },
[3]u64{ 7535526066623007027, 164893, 0 },
[3]u64{ 11302146918409311588, 164893408501686, 0 },
[3]u64{ 2480833299122194801, 16409970870640346804, 8938 },
[3]u64{ 11513226205589330558, 7721907286269370594, 234889586303 },
[3]u64{ 4073957068281936105, 14300743897882155131, 127418605432 },
[3]u64{ 3729887061093812886, 2068482633821123575, 120775244880 },
[3]u64{ 13616911779739451443, 4922882895416406094, 80112132668 },
[3]u64{ 13039053282195777666, 9317632875623428410, 60266870016 },
[3]u64{ 14490756113210417890, 5693844901999766254, 505109890 },
[3]u64{ 17432486112977557585, 11569484900262102262, 130308663950 },
[3]u64{ 14308820825344039837, 3138170119352085637, 142627183033 },
[3]u64{ 4190949538817536349, 950584692575235243, 185170120543 },
[3]u64{ 13616552502810964397, 8136430299747162645, 95051531299 },
[3]u64{ 4898145803694965031, 6698711700804594470, 35441076770 },
[3]u64{ 1399036321001644308, 17401191571004302008, 34363137888 },
[3]u64{ 17170331128243738540, 4721732028538188150, 96943320485 },
[3]u64{ 10641321388205367410, 2984214103553086219, 165255965606 },
[3]u64{ 6648873641312572851, 13128675202005662068, 166161774570 },
[3]u64{ 5988456964560374823, 14638512997670672834, 234711706908 },
[3]u64{ 9972593758348346915, 12942085665769692438, 28793555379 },
[3]u64{ 16709668921872818968, 14131134357119205086, 179701591869 },
[3]u64{ 6094829131503407767, 8921946894736102919, 61766050328 },
[3]u64{ 4892016478899926334, 5601522560505809989, 24483659710 },
[3]u64{ 13150857244079031538, 8602606493507716808, 190303659146 },
[3]u64{ 12983943395318785894, 8576789731078566487, 138466348232 },
[3]u64{ 15341644584614757478, 17881118138842658549, 200464948702 },
[3]u64{ 7507635124856644772, 11624372674432704923, 222969337356 },
[3]u64{ 11619655367084544354, 6826284072848095635, 12630158505 },
[3]u64{ 11553116952478783009, 1646466632033733563, 169370053601 },
[3]u64{ 17392150014233193245, 17871081657060299180, 225089255134 },
[3]u64{ 8877887560294980515, 15910893124677544709, 222968793277 },
[3]u64{ 18404180619915609503, 11031217459450580944, 189862531244 },
[3]u64{ 10079413095288181976, 13554987390037243094, 172598003496 },
[3]u64{ 14102802966539105550, 15026714590903687870, 40734817338 },
[3]u64{ 13333966026135891399, 4406379654994689200, 58814599830 },
[3]u64{ 12344968670173516152, 13596329092861950242, 150238870319 },
[3]u64{ 10577007819804726752, 284812388227373260, 47737058477 },
[3]u64{ 15337041354031088010, 9285079159392309382, 173015439710 },
[3]u64{ 14333607285614673616, 15046108141952711893, 94503345149 },
[3]u64{ 17171597563219696538, 13795366909944958311, 253815651156 },
[3]u64{ 2849642930482147564, 12909920641180059961, 84747848338 },
[3]u64{ 14791248423979435173, 5333762939889788252, 146699848200 },
[3]u64{ 13882371364576310127, 6411331390005944495, 8289143868 },
[3]u64{ 11735995808941329540, 1447104583224217723, 60347558971 },
[3]u64{ 11376996674339273181, 11940049226167932871, 59078447696 },
[3]u64{ 9849638057168043481, 9772290783590472385, 80647271365 },
[3]u64{ 18241520229279361964, 16351989577831528444, 197529756944 },
[3]u64{ 1865852368526961444, 4376738725895725097, 16886443131 },
[3]u64{ 10601487369276448158, 13851276297739812763, 123237263481 },
[3]u64{ 15999931310312762170, 12641996203470333509, 121750879192 },
[3]u64{ 5773775867713013570, 7707081716407945022, 216685323987 },
[3]u64{ 17726239863982547534, 417638323657040024, 211417801737 },
[3]u64{ 9711316695888316992, 16438047707692449100, 9022640218 },
[3]u64{ 17872002620723724288, 14850108107043306316, 90891108351 },
[3]u64{ 7429694208660733952, 10423290807904720835, 255805025973 },
[3]u64{ 1782821038871019520, 16951162310302339314, 181565047726 },
[3]u64{ 3225250234313474048, 2752437506572397322, 174918924350 },
[3]u64{ 10009250171830927360, 3925815842962784589, 62149209936 },
[3]u64{ 1152921504606846976, 5274166674003605291, 80212818903 },
[3]u64{ 0, 5538963350863452832, 215285913148 },
[3]u64{ 0, 16900671634439028736, 60300267804 },
[3]u64{ 0, 2326997710751662080, 28916187245 },
[3]u64{ 0, 12327726161625874432, 109126146798 },
[3]u64{ 0, 5756455743825903616, 238668287374 },
[3]u64{ 0, 3018537650245074944, 142312058091 },
[3]u64{ 0, 16717361816799281152, 235163635253 },
[3]u64{ 0, 0, 53906250000 },
[3]u64{ 0, 0, 16000000000 },
[3]u64{ 2285186318012886800, 2516073738, 0 },
[3]u64{ 9706420951402272035, 2516073738123880198, 0 },
[3]u64{ 2369632031840402142, 11997425759292732054, 136396630 },
[3]u64{ 15599123897979399458, 11491152661270395161, 86650381753 },
[3]u64{ 17579576584023912658, 18181063258234881272, 185622936633 },
[3]u64{ 3480927339588501811, 2466921813123869732, 57985597414 },
[3]u64{ 3547346616671294635, 8430880678232179465, 230133732099 },
[3]u64{ 7705317123868384954, 6738034873677997533, 3457038957 },
[3]u64{ 4969425237478353909, 7678250951042929246, 109365269602 },
[3]u64{ 17043246700132217175, 1853560606315563193, 98416238818 },
[3]u64{ 17053788362783499470, 14942676593409905118, 226100481721 },
[3]u64{ 11102988228454224768, 4909892170837638183, 185810044121 },
[3]u64{ 16944305387801685839, 16871149368312132405, 217266165787 },
[3]u64{ 11725142977459199276, 16096130589333770811, 27914586839 },
[3]u64{ 8175984171998533324, 12512479187631824282, 215872572987 },
[3]u64{ 1372352885142856895, 16980304980540557310, 59678302855 },
[3]u64{ 17975093466502888164, 8640919162749295366, 135920504177 },
[3]u64{ 6467823391459085653, 7862382415464063513, 113468425166 },
[3]u64{ 11319386883146885025, 14534157903009925344, 206426220604 },
[3]u64{ 9141999262922068637, 12627464554215107944, 60787898278 },
[3]u64{ 1587330393383478774, 2456849734836299173, 166684536225 },
[3]u64{ 884187548095712303, 18428252197697827913, 161133186090 },
[3]u64{ 488841225726377268, 7244734215936736255, 42998997553 },
[3]u64{ 17462624199405856193, 14756175050504770087, 49392737828 },
[3]u64{ 13183677579115583554, 6764116534566945922, 36799933852 },
[3]u64{ 11645015818917277779, 1588822142405565521, 156366683492 },
[3]u64{ 8760523002035971977, 17053265624843842052, 100086130220 },
[3]u64{ 10068817678491468042, 16996891591759999207, 44924459381 },
[3]u64{ 1273658177787418284, 8565556232370585876, 117921403339 },
[3]u64{ 3100019384328057661, 14464960359145886620, 203464339733 },
[3]u64{ 10363063568089458738, 5813189542048784035, 21784147072 },
[3]u64{ 13030756371481403666, 9739241026882027025, 128315133636 },
[3]u64{ 6538878900684195299, 18175068535675302910, 196527965313 },
[3]u64{ 8984884716779098868, 10562697212061761911, 129985272439 },
[3]u64{ 8728727397070363908, 4264834835660801368, 119572604963 },
[3]u64{ 6398650562917867005, 13019066443690126316, 35231197159 },
[3]u64{ 1190873176164938879, 1828040177823321846, 231705765006 },
[3]u64{ 4383628525805121795, 11240369830376975668, 142099098256 },
[3]u64{ 10189374699734119852, 8886938465302549874, 144609341669 },
[3]u64{ 5276291920541626391, 9985240313589688325, 229481761899 },
[3]u64{ 2692252373800386521, 722909126956573766, 107541300962 },
[3]u64{ 11578684995169173920, 5493363474638452381, 226039188982 },
[3]u64{ 5799408022254132587, 12410535279213120491, 246297795830 },
[3]u64{ 15548569837712345290, 10543108918366869098, 246672776465 },
[3]u64{ 15763030464322902955, 12953909016524823995, 17571543079 },
[3]u64{ 13257749746581255500, 16505942145872588169, 39702232814 },
[3]u64{ 16152470009188707678, 12428594380392015797, 238894788916 },
[3]u64{ 13806790848493904003, 7528259605829768337, 52673755451 },
[3]u64{ 11981226523265951191, 18147447600042811311, 59408107770 },
[3]u64{ 5133628726077003713, 12021069431116183911, 250983775105 },
[3]u64{ 16183955741910833164, 11819985069665662506, 129651663479 },
[3]u64{ 13640425554331371454, 10401877114068152814, 119640762674 },
[3]u64{ 18108120906868035862, 4611631138117837942, 50563886888 },
[3]u64{ 6324011669895037184, 17200813398607252417, 40249997024 },
[3]u64{ 10444437689515769856, 14100466137553658767, 224932457962 },
[3]u64{ 12324712543665782784, 17887776768825509301, 234764387800 },
[3]u64{ 13928941951563857920, 12632656857970087269, 216969698321 },
[3]u64{ 3975288688270639104, 8923681664054686256, 17684817700 },
[3]u64{ 11141905478114607104, 6213926103737837599, 36483753752 },
[3]u64{ 4611686018427387904, 1233118281776157762, 24336857609 },
[3]u64{ 0, 30716279628678784, 9066847476 },
[3]u64{ 0, 15775734650898546688, 244001665132 },
[3]u64{ 0, 976806005729918976, 108855204289 },
[3]u64{ 0, 12460098853279891456, 193052952759 },
[3]u64{ 0, 5635665595421687808, 183675463312 },
[3]u64{ 0, 1805943450575568896, 144305510044 },
[3]u64{ 0, 11529215046068469760, 156097900390 },
[3]u64{ 0, 0, 102625000000 },
[3]u64{ 0, 0, 64000000000 },
[3]u64{ 4398362855256705725, 38392, 0 },
[3]u64{ 2812083125569302717, 38392238435728, 0 },
[3]u64{ 12868509142973100603, 4564018338575530435, 2081 },
[3]u64{ 8726243776748165726, 16553437246451512014, 33247415929 },
[3]u64{ 358304413426858117, 4339777136957372927, 121897363631 },
[3]u64{ 3180720351566429470, 18439463366554654697, 175235259789 },
[3]u64{ 14053818240400098784, 1370067356680643003, 141999605312 },
[3]u64{ 7340140541492429288, 4210124040914115013, 64074271500 },
[3]u64{ 1323571167904965058, 10692225626142609720, 12228231281 },
[3]u64{ 14463851737583396026, 11592856673895384344, 113579626712 },
[3]u64{ 15122784818916048486, 10284479231227406269, 216628450019 },
[3]u64{ 13557974621377508955, 4961071383534266431, 227557522736 },
[3]u64{ 17525172074563876264, 10960611551445686988, 48268940218 },
[3]u64{ 15148880683074215967, 14616396723115619209, 186594175942 },
[3]u64{ 6744828147558597936, 1025604265437492803, 198792356454 },
[3]u64{ 9799290779647971692, 11711588454892179178, 102055598118 },
[3]u64{ 11170890203898678105, 5580373263251565705, 38634886482 },
[3]u64{ 7068779781287527905, 14109334653033148931, 82302512640 },
[3]u64{ 14474741922505540911, 2899414033769399895, 764868564 },
[3]u64{ 17107062680405191514, 13233457234892808147, 212157177549 },
[3]u64{ 2712598571300237005, 3287946691509034862, 205717387154 },
[3]u64{ 3767556054903418641, 5488480288717445911, 146178239947 },
[3]u64{ 18158239681706277628, 11687233053874362630, 203297531112 },
[3]u64{ 10531652712128330681, 6783772100089274577, 232633566173 },
[3]u64{ 9548395326934120567, 7898291058728402485, 221367749022 },
[3]u64{ 15875647850297719390, 4423684977486598491, 158428167216 },
[3]u64{ 8215825295203192574, 2750833684599526706, 48239808443 },
[3]u64{ 12747310908260543144, 15669689830489025709, 187149122992 },
[3]u64{ 77706528053613642, 15117307274214954517, 176849455587 },
[3]u64{ 6024737704056756146, 8148639818575698175, 227819510869 },
[3]u64{ 6819452388570089667, 13006484426078994901, 85441738649 },
[3]u64{ 13695926775373186254, 10287496057845513526, 153705082933 },
[3]u64{ 3746531715392682132, 14159876032966532430, 53557686278 },
[3]u64{ 4717376233154528116, 15742212196465548019, 6767608417 },
[3]u64{ 385190957950313369, 2892220461917134150, 97853387033 },
[3]u64{ 12388374310648616082, 7487151560715393883, 25156787585 },
[3]u64{ 1078067332084407770, 7245756744165177933, 129405879299 },
[3]u64{ 3257295319358714850, 3067122860671533987, 3392793260 },
[3]u64{ 1545453099660723457, 8135043905834122525, 172166269063 },
[3]u64{ 7495477664653506341, 14730019368921022572, 135441001613 },
[3]u64{ 7225503732673614354, 495969939682055458, 141798515950 },
[3]u64{ 3935478326103643956, 5617761407265775598, 238026886584 },
[3]u64{ 10082240682742686210, 2087044847072781811, 184304539456 },
[3]u64{ 10838712705567897138, 15929674232061203330, 64113138927 },
[3]u64{ 2142546572501643680, 8658086469608285873, 239863549370 },
[3]u64{ 7893042119150331392, 18369871790780313570, 186469355807 },
[3]u64{ 12084811642251302615, 3545648451947416750, 31995832745 },
[3]u64{ 15317234482572954775, 13347376792767929959, 169192209987 },
[3]u64{ 2283226355108359361, 14482164459838203025, 67723562745 },
[3]u64{ 13359725152575722127, 8899577765623565820, 249785079708 },
[3]u64{ 13126551011491594557, 7095320096604405719, 156482447077 },
[3]u64{ 3598021288691861269, 2968593824439315788, 229384638073 },
[3]u64{ 16462621795896662961, 12621408323612585636, 121160927793 },
[3]u64{ 14682112756964627332, 3954422936414648259, 49684207916 },
[3]u64{ 7174112100896070218, 17143730087577690191, 44214369696 },
[3]u64{ 5023109019590616064, 5033045529399041876, 160929363470 },
[3]u64{ 10765223023086141440, 15857648521994521781, 14272841944 },
[3]u64{ 8228137177297453056, 16655573486499109541, 216859644848 },
[3]u64{ 2891199497780592640, 16652154439190075858, 176902900447 },
[3]u64{ 15294857653247803392, 18016950600164130638, 223902715100 },
[3]u64{ 14303432416528695296, 2086292996072613910, 220976700849 },
[3]u64{ 0, 17324462585194799521, 177113098169 },
[3]u64{ 0, 11079151463184927232, 185939160998 },
[3]u64{ 0, 5239846817488961536, 166600602004 },
[3]u64{ 0, 2778806963520143360, 148284052665 },
[3]u64{ 0, 6240890740138835968, 185150639427 },
[3]u64{ 0, 17250651344549707776, 67338319364 },
[3]u64{ 0, 4197354852709302272, 4935159683 },
[3]u64{ 0, 9223372036854775808, 131227539062 },
[3]u64{ 0, 0, 118500000000 },
[3]u64{ 17118225092618494573, 585819067, 0 },
[3]u64{ 13385738875341807559, 585819067927980841, 0 },
[3]u64{ 8272682717439277193, 5654803392547571318, 31757315 },
[3]u64{ 13402436483369350083, 2931628102185393332, 3306547506 },
[3]u64{ 10946328903241612536, 15964697617980212305, 50158923877 },
[3]u64{ 16265808923426731252, 450380868305846606, 101865447992 },
[3]u64{ 11080374459871185177, 14631133530814566148, 56024415195 },
[3]u64{ 1240761893433831916, 31969822783742095, 219793155338 },
[3]u64{ 367264070493390483, 10437269029385743245, 10001733087 },
[3]u64{ 2863675693461092905, 15196146496377392433, 223565805487 },
[3]u64{ 7511929581752138999, 4409099735137480938, 175823784752 },
[3]u64{ 11154557789993845753, 10644987914903248118, 48239017775 },
[3]u64{ 8325416539745948522, 3154431617534062973, 47577065951 },
[3]u64{ 17745129874679852617, 11702056331247960454, 223171002080 },
[3]u64{ 1074820986392253357, 15575315065965259114, 224634369744 },
[3]u64{ 7820952682162838597, 10759747609480050226, 208844339521 },
[3]u64{ 8215518006273528603, 12538236653960743718, 65583287086 },
[3]u64{ 9680426791089900133, 17857942663978005403, 46679699170 },
[3]u64{ 16128495723604797412, 11443004154750813211, 226968081011 },
[3]u64{ 2264789053583348885, 4004313188770806737, 115620326498 },
[3]u64{ 11175458488686298083, 17134872954824183228, 98217074252 },
[3]u64{ 11026777810412287617, 2659553912986171234, 76928883324 },
[3]u64{ 16199890034895598640, 9501854300969137926, 124144174706 },
[3]u64{ 9094320719494763752, 14528169966301018150, 114515096553 },
[3]u64{ 1250835564687222832, 18172091996515901778, 233787573671 },
[3]u64{ 15362466642459337025, 1133541705604751035, 167985111081 },
[3]u64{ 7831109835595423828, 18280349987988641497, 41061449418 },
[3]u64{ 15426237284335022429, 9936015874712336386, 202990979758 },
[3]u64{ 15636308361455434548, 15876720399740689614, 174538632499 },
[3]u64{ 13967173875944980328, 8618117825152456982, 51860678737 },
[3]u64{ 18245979923595824097, 8085525680745921564, 81467189103 },
[3]u64{ 11335054479675278263, 8072355444669730953, 111438317225 },
[3]u64{ 11165339882630461707, 9395030504766848294, 169437603265 },
[3]u64{ 15944437408299395922, 3537903114058185903, 193509305624 },
[3]u64{ 15806416348777321161, 2126094743961928691, 24191790112 },
[3]u64{ 4201030477408556248, 289185362555601115, 32115255827 },
[3]u64{ 9485474942554588907, 16909937501450129614, 19015676769 },
[3]u64{ 18238757647663230541, 14449642060360499058, 97916689548 },
[3]u64{ 4642199687824746379, 12433818908498244393, 140783316665 },
[3]u64{ 6134575894869364037, 11884444034578008581, 185674038673 },
[3]u64{ 11524208547121316008, 988625838444140793, 145644257002 },
[3]u64{ 2734683241527878366, 1675370907158909973, 234053593514 },
[3]u64{ 10629223456178675171, 15920186275316934067, 170090822038 },
[3]u64{ 2788042336985254064, 5600921198503757726, 150863035027 },
[3]u64{ 17285498758066142502, 10457357161776341741, 147303626546 },
[3]u64{ 5525538192421886436, 12225356765775740093, 50566894467 },
[3]u64{ 11414325503043801888, 4486633318598164537, 131662737918 },
[3]u64{ 7246608114685173259, 10302486602879381361, 254243220879 },
[3]u64{ 1007884269852184608, 15536428611301239541, 143558498917 },
[3]u64{ 13823717876510029312, 12026126645955462603, 101842231482 },
[3]u64{ 12487410768239429317, 14877968141142123551, 186651937631 },
[3]u64{ 3361062421598631942, 734560801645383190, 95806536269 },
[3]u64{ 17853337379088328475, 15648943144911081638, 77039820620 },
[3]u64{ 11551561037491869885, 13664182862003235646, 76848330907 },
[3]u64{ 11480877996635204802, 3895127525902132786, 155740736837 },
[3]u64{ 5527488381934471912, 5249187334214137467, 69211155286 },
[3]u64{ 11143438404407726080, 10642260063359027505, 86284559015 },
[3]u64{ 6472279730688098304, 783598951897779422, 167576918074 },
[3]u64{ 4561816853579563008, 5538576558607624843, 58042478984 },
[3]u64{ 2888714464062865408, 15974581187564609611, 136300246836 },
[3]u64{ 16258276129784201216, 7474269406918257428, 52865983781 },
[3]u64{ 720575940379279360, 8045286838779138019, 37405180956 },
[3]u64{ 0, 8184246376556341732, 28436135873 },
[3]u64{ 0, 1493267152679331840, 193443668885 },
[3]u64{ 0, 10179074811222818816, 149080950174 },
[3]u64{ 0, 3892499202005008384, 158551808751 },
[3]u64{ 0, 10341173215925108736, 239211012804 },
[3]u64{ 0, 6230307872002015232, 196560596123 },
[3]u64{ 0, 9295429630892703744, 155337745666 },
[3]u64{ 0, 0, 2503906250 },
[3]u64{ 0, 0, 202000000000 },
[3]u64{ 16409970870640346804, 8938, 0 },
[3]u64{ 7721907286269370594, 8938889586303, 0 },
[3]u64{ 14300743897882155131, 10665454627995623288, 484 },
[3]u64{ 2068482633821123575, 16803537892767562832, 228578175453 },
[3]u64{ 4922882895416406094, 8099123106849104444, 221910921614 },
[3]u64{ 9317632875623428410, 7077413686679401728, 142439054343 },
[3]u64{ 5693844901999766254, 13536636358372449666, 7383667364 },
[3]u64{ 11569484900262102262, 7280632235418610318, 164733822527 },
[3]u64{ 3138170119352085637, 6187823673116858809, 63394683864 },
[3]u64{ 950584692575235243, 8624343686231740255, 216335442593 },
[3]u64{ 8136430299747162645, 806211610822132771, 161467526608 },
[3]u64{ 6698711700804594470, 18388078233202190882, 208043704818 },
[3]u64{ 17401191571004302008, 7628864426595573600, 242996819718 },
[3]u64{ 4721732028538188150, 4530799784343874981, 6413561569 },
[3]u64{ 2984214103553086219, 8561580552078486438, 225245615148 },
[3]u64{ 13128675202005662068, 13349114951221999594, 44464124211 },
[3]u64{ 14638512997670672834, 10029144738508991772, 51723656971 },
[3]u64{ 12942085665769692438, 12601907197916268979, 11543681025 },
[3]u64{ 14131134357119205086, 1329580921391066941, 1683150758 },
[3]u64{ 8921946894736102919, 3198179786356761112, 166072076726 },
[3]u64{ 5601522560505809989, 11406753413634654142, 182173373673 },
[3]u64{ 8602606493507716808, 11131812960525182090, 233618361341 },
[3]u64{ 8576789731078566487, 14299636753645227208, 253603456789 },
[3]u64{ 17881118138842658549, 12964114684643663326, 21775184861 },
[3]u64{ 11624372674432704923, 5019257593846306316, 221702786065 },
[3]u64{ 6826284072848095635, 6929086798159998121, 17272094499 },
[3]u64{ 1646466632033733563, 18359765766933703649, 35375626547 },
[3]u64{ 17871081657060299180, 9993076234752063198, 51995284896 },
[3]u64{ 15910893124677544709, 3257189215046584509, 160541725748 },
[3]u64{ 11031217459450580944, 2905234736672690348, 52176572581 },
[3]u64{ 13554987390037243094, 12064985302079670056, 165157493090 },
[3]u64{ 15026714590903687870, 14315096064942799930, 98654044163 },
[3]u64{ 4406379654994689200, 11943971043551974038, 3776022912 },
[3]u64{ 13596329092861950242, 12472773152119929647, 128647483967 },
[3]u64{ 284812388227373260, 7791259796982183085, 63676150387 },
[3]u64{ 9285079159392309382, 16866829442051086686, 115422365039 },
[3]u64{ 15046108141952711893, 3702498393844653053, 111914352656 },
[3]u64{ 13795366909944958311, 2057239613841701716, 16200712840 },
[3]u64{ 12909920641180059961, 17201969976738286226, 136111523182 },
[3]u64{ 5333762939889788252, 18271566505443461640, 110932520660 },
[3]u64{ 6411331390005944495, 18368509115417119804, 212990503604 },
[3]u64{ 1447104583224217723, 7613923684154518587, 180995758874 },
[3]u64{ 11940049226167932871, 17984805084714865232, 26412751629 },
[3]u64{ 9772290783590472385, 4220802739051410373, 13974958237 },
[3]u64{ 16351989577831528444, 17812459042810815760, 157228810174 },
[3]u64{ 4376738725895725097, 10629526089664605307, 190965615339 },
[3]u64{ 13851276297739812763, 17437443267816548473, 235576227763 },
[3]u64{ 12641996203470333509, 12506371893701049304, 179945285693 },
[3]u64{ 7707081716407945022, 15737221540003030739, 61677971778 },
[3]u64{ 417638323657040024, 2358380859011605513, 66853116489 },
[3]u64{ 16438047707692449100, 10042972713837039706, 73127848082 },
[3]u64{ 14850108107043306316, 13424397272769642495, 146544430641 },
[3]u64{ 10423290807904720835, 6867102315755663029, 49727738034 },
[3]u64{ 16951162310302339314, 8690748404825506734, 178372266362 },
[3]u64{ 2752437506572397322, 956229930815387710, 122471126415 },
[3]u64{ 3925815842962784589, 7734449506297687888, 143051837328 },
[3]u64{ 5274166674003605291, 16332184961683848151, 144419285347 },
[3]u64{ 5538963350863452832, 15580777817612768828, 99885369520 },
[3]u64{ 16900671634439028736, 17404245271944696092, 176844635657 },
[3]u64{ 2326997710751662080, 13201420160494469229, 9943486026 },
[3]u64{ 12327726161625874432, 16511717657124068078, 74715650420 },
[3]u64{ 5756455743825903616, 14131292492116594062, 116895102007 },
[3]u64{ 3018537650245074944, 18429136031865875691, 55766058900 },
[3]u64{ 16717361816799281152, 2563978348305862197, 148999045466 },
[3]u64{ 0, 14239974392147482896, 90138993544 },
[3]u64{ 0, 11164201396098998272, 136771950558 },
[3]u64{ 0, 7116971104932986880, 222605212570 },
[3]u64{ 0, 12437629862867369984, 154385811776 },
[3]u64{ 0, 16501893821638901760, 64674245265 },
[3]u64{ 0, 10649324268870959104, 145894569456 },
[3]u64{ 0, 7205759403792793600, 240577301025 },
[3]u64{ 0, 0, 33390625000 },
[3]u64{ 0, 0, 232000000000 },
[3]u64{ 11997425759292732054, 136396630, 0 },
[3]u64{ 11491152661270395161, 136396630650381753, 0 },
[3]u64{ 18181063258234881272, 3016823727048309817, 7394076 },
[3]u64{ 2466921813123869732, 17405973192644624358, 28163542341 },
[3]u64{ 8430880678232179465, 8937219978302591747, 69943579697 },
[3]u64{ 6738034873677997533, 15178463196824222317, 49484487665 },
[3]u64{ 7678250951042929246, 11979404627460330594, 241822826138 },
[3]u64{ 1853560606315563193, 2006448052689740002, 154649404826 },
[3]u64{ 14942676593409905118, 16330465320863239865, 154108769766 },
[3]u64{ 4909892170837638183, 17136208883957646553, 230885276298 },
[3]u64{ 16871149368312132405, 140455118208931867, 138928955745 },
[3]u64{ 16096130589333770811, 3964972929179372247, 97007614087 },
[3]u64{ 12512479187631824282, 3378050330022776379, 135214941613 },
[3]u64{ 16980304980540557310, 6065353437512901255, 173183124475 },
[3]u64{ 8640919162749295366, 12768753059854699889, 251328803468 },
[3]u64{ 7862382415464063513, 6848720690951013326, 140692195490 },
[3]u64{ 14534157903009925344, 10953228058585475132, 162371269892 },
[3]u64{ 12627464554215107944, 15539127852083296166, 4593775682 },
[3]u64{ 2456849734836299173, 14534853647735598497, 66842377808 },
[3]u64{ 18428252197697827913, 1506909603576368170, 80787935995 },
[3]u64{ 7244734215936736255, 5475702579938239025, 251081689733 },
[3]u64{ 14756175050504770087, 12039747373985783332, 133296838431 },
[3]u64{ 6764116534566945922, 17572399137760898460, 31652676012 },
[3]u64{ 1588822142405565521, 869552790852091236, 172952601666 },
[3]u64{ 17053265624843842052, 4549585778048181804, 66047138551 },
[3]u64{ 16996891591759999207, 4121918231767210357, 247246633539 },
[3]u64{ 8565556232370585876, 1558397953312543179, 67223449635 },
[3]u64{ 14464960359145886620, 6067524298738069781, 35084480922 },
[3]u64{ 5813189542048784035, 5811095224555517056, 154328921151 },
[3]u64{ 9739241026882027025, 6440894514158997188, 63315020103 },
[3]u64{ 18175068535675302910, 4612748874388784257, 71349161591 },
[3]u64{ 10562697212061761911, 9908101430749813367, 119250057617 },
[3]u64{ 4264834835660801368, 15150017990912190499, 145537119254 },
[3]u64{ 13019066443690126316, 17470426264690059239, 22821284120 },
[3]u64{ 1828040177823321846, 9615161096851907726, 24947073705 },
[3]u64{ 11240369830376975668, 9227932132124142224, 169521238927 },
[3]u64{ 8886938465302549874, 4794113194321211621, 143500247203 },
[3]u64{ 9985240313589688325, 391512698859146347, 163259889397 },
[3]u64{ 722909126956573766, 17209658878068655842, 245021223945 },
[3]u64{ 5493363474638452381, 3077364726606876150, 9932937477 },
[3]u64{ 12410535279213120491, 1952989567673965814, 5166824276 },
[3]u64{ 10543108918366869098, 11172860676923186449, 84105871776 },
[3]u64{ 12953909016524823995, 17338078544784947239, 160605681990 },
[3]u64{ 16505942145872588169, 4593380466519703278, 70939899121 },
[3]u64{ 12428594380392015797, 786884753602720052, 241249007654 },
[3]u64{ 7528259605829768337, 17848875822468020539, 38042657107 },
[3]u64{ 18147447600042811311, 2899664567187130618, 83967589497 },
[3]u64{ 12021069431116183911, 2973178834961857409, 121157191131 },
[3]u64{ 11819985069665662506, 11117453141176836727, 219161176347 },
[3]u64{ 10401877114068152814, 7535238370146462002, 27602678342 },
[3]u64{ 4611631138117837942, 10246175467290865448, 70408486090 },
[3]u64{ 17200813398607252417, 1203128834127050464, 202555446285 },
[3]u64{ 14100466137553658767, 14518048959078919658, 13065221744 },
[3]u64{ 17887776768825509301, 1553474987376920024, 112787025011 },
[3]u64{ 12632656857970087269, 14956572380830948369, 115084214047 },
[3]u64{ 8923681664054686256, 7594162606042048292, 31810797413 },
[3]u64{ 6213926103737837599, 14461296147288811288, 101411680379 },
[3]u64{ 1233118281776157762, 18305427728131488265, 123783948434 },
[3]u64{ 30716279628678784, 10253208939347909876, 146992339225 },
[3]u64{ 15775734650898546688, 6446028915490812012, 25555827570 },
[3]u64{ 976806005729918976, 12986063676957432257, 114349439927 },
[3]u64{ 12460098853279891456, 9769714697972762807, 183703975922 },
[3]u64{ 5635665595421687808, 97429465146664592, 242529617295 },
[3]u64{ 1805943450575568896, 16395571728207795868, 143005281661 },
[3]u64{ 11529215046068469760, 6331668478323650406, 125888805724 },
[3]u64{ 0, 18129911846294207040, 92343240435 },
[3]u64{ 0, 9890094564876124160, 243982824490 },
[3]u64{ 0, 12290856656987750400, 42536143100 },
[3]u64{ 0, 8498454992640802816, 252666288674 },
[3]u64{ 0, 5341660584200896512, 34460702168 },
[3]u64{ 0, 9288674231451648000, 216289572000 },
[3]u64{ 0, 1152921504606846976, 160503540039 },
[3]u64{ 0, 0, 71062500000 },
[3]u64{ 0, 0, 160000000000 },
[3]u64{ 4564018338575530435, 2081, 0 },
[3]u64{ 16553437246451512014, 2081247415929, 0 },
[3]u64{ 4339777136957372927, 15212079674427582639, 112 },
[3]u64{ 18439463366554654697, 10179808126814248333, 112824648491 },
[3]u64{ 1370067356680643003, 6066766544199222848, 43551848504 },
[3]u64{ 4210124040914115013, 6625308131806923532, 56328880073 },
[3]u64{ 10692225626142609720, 9122786786400665713, 201359158673 },
[3]u64{ 11592856673895384344, 11932880778639151320, 145494547262 },
[3]u64{ 10284479231227406269, 3884040911779255011, 62646882763 },
[3]u64{ 4961071383534266431, 13441817515637357872, 203210554279 },
[3]u64{ 10960611551445686988, 11628577856022352826, 167728682387 },
[3]u64{ 14616396723115619209, 13296656925520243654, 147630386468 },
[3]u64{ 1025604265437492803, 5020720704545399398, 36720813216 },
[3]u64{ 11711588454892179178, 14121973606499014694, 160272173814 },
[3]u64{ 5580373263251565705, 3642481034345420114, 246765553723 },
[3]u64{ 14109334653033148931, 9845536238569696768, 59197459292 },
[3]u64{ 2899414033769399895, 17655403572195686356, 92533727588 },
[3]u64{ 13233457234892808147, 8377495365136654029, 100957101345 },
[3]u64{ 3287946691509034862, 13713682649609025426, 33454144933 },
[3]u64{ 5488480288717445911, 1367709905452854731, 165743420226 },
[3]u64{ 11687233053874362630, 9981467701727208680, 66074143702 },
[3]u64{ 6783772100089274577, 6277920117543306205, 214541096448 },
[3]u64{ 7898291058728402485, 9344111460418701726, 340326731 },
[3]u64{ 4423684977486598491, 4918507011364617264, 75506545297 },
[3]u64{ 2750833684599526706, 6554777203830755259, 145266632799 },
[3]u64{ 15669689830489025709, 4198262173120265648, 95355335184 },
[3]u64{ 15117307274214954517, 8080325935698446819, 16227588248 },
[3]u64{ 8148639818575698175, 12797633874200091733, 152438035346 },
[3]u64{ 13006484426078994901, 8376502502208665497, 146693761122 },
[3]u64{ 10287496057845513526, 9891973386793349173, 98454091110 },
[3]u64{ 14159876032966532430, 14877430279003795462, 102536244951 },
[3]u64{ 15742212196465548019, 8759933935842067041, 215806507111 },
[3]u64{ 2892220461917134150, 3753418510388703513, 103474876970 },
[3]u64{ 7487151560715393883, 2961383332545305985, 42203473225 },
[3]u64{ 7245756744165177933, 2497674184068629507, 73160536912 },
[3]u64{ 3067122860671533987, 15244544070742305452, 80135399188 },
[3]u64{ 8135043905834122525, 45953573565810823, 20826408390 },
[3]u64{ 14730019368921022572, 3960077421351906445, 198002491148 },
[3]u64{ 495969939682055458, 3173330011013883118, 12214676227 },
[3]u64{ 5617761407265775598, 11026266219545759160, 3172026564 },
[3]u64{ 2087044847072781811, 8886757764964685632, 196597735089 },
[3]u64{ 15929674232061203330, 13952322129918090479, 177481752103 },
[3]u64{ 8658086469608285873, 4127250666614902202, 39756356898 },
[3]u64{ 18369871790780313570, 17649958504065306911, 34223738706 },
[3]u64{ 3545648451947416750, 13269305359002216873, 82956806167 },
[3]u64{ 13347376792767929959, 16236593433831947843, 23719330484 },
[3]u64{ 14482164459838203025, 13580930396682424057, 180880187493 },
[3]u64{ 8899577765623565820, 421976357197961116, 101736223712 },
[3]u64{ 7095320096604405719, 2962130818798626533, 224022875384 },
[3]u64{ 2968593824439315788, 8234383947306356345, 248160577433 },
[3]u64{ 12621408323612585636, 4380469931801381425, 153446386848 },
[3]u64{ 3954422936414648259, 15279887469027055916, 160237465750 },
[3]u64{ 17143730087577690191, 8534542821713755552, 150828324359 },
[3]u64{ 5033045529399041876, 7814613482565088782, 7462658493 },
[3]u64{ 15857648521994521781, 13771954404705323224, 189423631045 },
[3]u64{ 16655573486499109541, 4568173274762548144, 197746579144 },
[3]u64{ 16652154439190075858, 8105292616250821343, 200247641169 },
[3]u64{ 18016950600164130638, 2923678426777275612, 81439388793 },
[3]u64{ 2086292996072613910, 1808633176918384049, 121158492925 },
[3]u64{ 17324462585194799521, 18118642609460438969, 253098046200 },
[3]u64{ 11079151463184927232, 18138164175864360870, 248982213583 },
[3]u64{ 5239846817488961536, 4031433690465792404, 207983271850 },
[3]u64{ 2778806963520143360, 5012226396942308537, 170218544458 },
[3]u64{ 6240890740138835968, 7889712298793536835, 74271713337 },
[3]u64{ 17250651344549707776, 13500762396543628804, 57427702160 },
[3]u64{ 4197354852709302272, 501020624068841347, 144731877796 },
[3]u64{ 9223372036854775808, 8370653768288261750, 164027160382 },
[3]u64{ 0, 647579990023635200, 62453774050 },
[3]u64{ 0, 11106569307181154304, 226035105381 },
[3]u64{ 0, 10797461613892861952, 101602088328 },
[3]u64{ 0, 17627230675448889344, 136585331566 },
[3]u64{ 0, 12197735707942322176, 110955574089 },
[3]u64{ 0, 12871287735024877568, 73661240577 },
[3]u64{ 0, 4611686018427387904, 1697753906 },
[3]u64{ 0, 0, 50250000000 },
[3]u64{ 0, 0, 128000000000 },
[3]u64{ 5654803392547571318, 31757315, 0 },
[3]u64{ 2931628102185393332, 31757315306547506, 0 },
[3]u64{ 15964697617980212305, 9451803574512021605, 1721567 },
[3]u64{ 450380868305846606, 8662766454758138424, 223512383298 },
[3]u64{ 14631133530814566148, 9207992007314947035, 66469609510 },
[3]u64{ 31969822783742095, 17118602861291201802, 38499166246 },
[3]u64{ 10437269029385743245, 11186560605745599967, 38928001320 },
[3]u64{ 15196146496377392433, 10505549821532796847, 40606424665 },
[3]u64{ 4409099735137480938, 18133667530488679216, 89569506996 },
[3]u64{ 10644987914903248118, 10778135771244330799, 180983028086 },
[3]u64{ 3154431617534062973, 17087985777033767391, 118584283910 },
[3]u64{ 11702056331247960454, 2639185991757283040, 6926341565 },
[3]u64{ 15575315065965259114, 5401720287293896400, 189143070559 },
[3]u64{ 10759747609480050226, 9816495392633895233, 95292827843 },
[3]u64{ 12538236653960743718, 10042051500090034990, 195532153281 },
[3]u64{ 17857942663978005403, 11629689537856384738, 193544380702 },
[3]u64{ 11443004154750813211, 2099086731766010483, 30630446733 },
[3]u64{ 4004313188770806737, 13665537898516458594, 141113791719 },
[3]u64{ 17134872954824183228, 16375672064669490764, 231740810293 },
[3]u64{ 2659553912986171234, 7770550512184564348, 53887726961 },
[3]u64{ 9501854300969137926, 6197048880720627314, 113421242387 },
[3]u64{ 14528169966301018150, 17963594118523106281, 19335942692 },
[3]u64{ 18172091996515901778, 8255454642407818663, 36973808388 },
[3]u64{ 1133541705604751035, 16744201957549498409, 4447529092 },
[3]u64{ 18280349987988641497, 17442505417202859722, 132907705006 },
[3]u64{ 9936015874712336386, 6383975767786687150, 174945560113 },
[3]u64{ 15876720399740689614, 15245442964998335795, 49346076019 },
[3]u64{ 8618117825152456982, 2910016124519524433, 115826457119 },
[3]u64{ 8085525680745921564, 3847913871169988463, 31157752290 },
[3]u64{ 8072355444669730953, 17210451512590059177, 226208595828 },
[3]u64{ 9395030504766848294, 17899408909991454145, 116932980445 },
[3]u64{ 3537903114058185903, 5920601932753251608, 221970328901 },
[3]u64{ 2126094743961928691, 16521781895108979744, 69320956473 },
[3]u64{ 289185362555601115, 3697493405554698771, 57895647591 },
[3]u64{ 16909937501450129614, 2816108280295732065, 103200441519 },
[3]u64{ 14449642060360499058, 14251078772056398988, 175152661535 },
[3]u64{ 12433818908498244393, 4543066550096031417, 31772552528 },
[3]u64{ 11884444034578008581, 3099369389734296977, 80246280131 },
[3]u64{ 988625838444140793, 5243484113636490986, 195168017151 },
[3]u64{ 1675370907158909973, 6823370511605197226, 255284249843 },
[3]u64{ 15920186275316934067, 11396290277624641942, 243369895656 },
[3]u64{ 5600921198503757726, 15934361408437566099, 232617794133 },
[3]u64{ 10457357161776341741, 14939272230935131954, 85863803462 },
[3]u64{ 12225356765775740093, 7500666177940329347, 70809859570 },
[3]u64{ 4486633318598164537, 4806714453065462270, 242406611928 },
[3]u64{ 10302486602879381361, 11557851247268441487, 216260572512 },
[3]u64{ 15536428611301239541, 10655523157206817381, 96626552371 },
[3]u64{ 12026126645955462603, 14769600176490881210, 51577637067 },
[3]u64{ 14877968141142123551, 16688495540925795167, 203800661629 },
[3]u64{ 734560801645383190, 909793965395524173, 125904685156 },
[3]u64{ 15648943144911081638, 12724590949761703756, 100049320029 },
[3]u64{ 13664182862003235646, 10810739657314826395, 93689801457 },
[3]u64{ 3895127525902132786, 2431218615388671301, 241586051371 },
[3]u64{ 5249187334214137467, 4235001167959059286, 43131796625 },
[3]u64{ 10642260063359027505, 6253317787396334247, 145229579873 },
[3]u64{ 783598951897779422, 9534525563070371898, 97338993036 },
[3]u64{ 5538576558607624843, 8392783992374030728, 140516867666 },
[3]u64{ 15974581187564609611, 16356257019231647540, 82454973731 },
[3]u64{ 7474269406918257428, 12896334001521091877, 35886674469 },
[3]u64{ 8045286838779138019, 1427636373320877084, 37699111667 },
[3]u64{ 8184246376556341732, 16116755731295043521, 243077392322 },
[3]u64{ 1493267152679331840, 15945633911163986837, 194873691078 },
[3]u64{ 10179074811222818816, 7510154241072743838, 198864414546 },
[3]u64{ 3892499202005008384, 3571560509790395119, 82407126277 },
[3]u64{ 10341173215925108736, 3576991649007035076, 5193614683 },
[3]u64{ 6230307872002015232, 15509961892750732443, 91193909105 },
[3]u64{ 9295429630892703744, 17789791359353349378, 113840796718 },
[3]u64{ 0, 18331227331079738314, 46964386521 },
[3]u64{ 0, 15386712883100476416, 217993737824 },
[3]u64{ 0, 14082462055028752384, 96834115376 },
[3]u64{ 0, 12919043128765186048, 48763411797 },
[3]u64{ 0, 6125373368465096704, 85700342731 },
[3]u64{ 0, 12335992698065387520, 203332057155 },
[3]u64{ 0, 2774217370460225536, 67668735504 },
[3]u64{ 0, 0, 16150390625 },
[3]u64{ 0, 0, 97000000000 },
[3]u64{ 10665454627995623288, 484, 0 },
[3]u64{ 16803537892767562832, 484578175453, 0 },
[3]u64{ 8099123106849104444, 4962829537462579598, 26 },
[3]u64{ 7077413686679401728, 5711259460785241095, 26269035528 },
[3]u64{ 13536636358372449666, 13845894607204897444, 8309607995 },
[3]u64{ 7280632235418610318, 12116633056637003327, 59750587450 },
[3]u64{ 6187823673116858809, 2965791047992089560, 58656843994 },
[3]u64{ 8624343686231740255, 16021997451315962529, 218160775854 },
[3]u64{ 806211610822132771, 3942052271663803856, 174868554222 },
[3]u64{ 18388078233202190882, 15669876414782439922, 238213699081 },
[3]u64{ 7628864426595573600, 10594415915406145286, 9849465702 },
[3]u64{ 4530799784343874981, 10789820553031921377, 102574324437 },
[3]u64{ 8561580552078486438, 3989990218583987244, 213584917344 },
[3]u64{ 13349114951221999594, 2937341169808224563, 96216297803 },
[3]u64{ 10029144738508991772, 16267436558584536843, 75159233583 },
[3]u64{ 12601907197916268979, 16221580362814625793, 47881859502 },
[3]u64{ 1329580921391066941, 9695437602320209830, 174879373633 },
[3]u64{ 3198179786356761112, 10729753156793715126, 65525590725 },
[3]u64{ 11406753413634654142, 2609241432056861929, 197581661084 },
[3]u64{ 11131812960525182090, 8462663743997037565, 156141447261 },
[3]u64{ 14299636753645227208, 14993422143908194069, 93458761920 },
[3]u64{ 12964114684643663326, 1307443894537745373, 192812795043 },
[3]u64{ 5019257593846306316, 10017257439419829265, 163070876675 },
[3]u64{ 6929086798159998121, 16754772009970777891, 3543036613 },
[3]u64{ 18359765766933703649, 11722573031602862387, 197908278010 },
[3]u64{ 9993076234752063198, 7363764277467092384, 250635481957 },
[3]u64{ 3257189215046584509, 6733958494847390772, 101399190461 },
[3]u64{ 2905234736672690348, 8799796600227451045, 189365048621 },
[3]u64{ 12064985302079670056, 10512023194742249826, 45477037929 },
[3]u64{ 14315096064942799930, 4572542132337197059, 105569857919 },
[3]u64{ 11943971043551974038, 12600500455757416832, 127247878005 },
[3]u64{ 12472773152119929647, 7873789864743195199, 117683074498 },
[3]u64{ 7791259796982183085, 15724851676325671539, 194426839003 },
[3]u64{ 16866829442051086686, 8748017220462413167, 219852445917 },
[3]u64{ 3702498393844653053, 14172589522760466448, 221474230963 },
[3]u64{ 2057239613841701716, 9520545591489413768, 179768297617 },
[3]u64{ 17201969976738286226, 12488551088392570222, 145516109810 },
[3]u64{ 18271566505443461640, 1135798823651241684, 242677005711 },
[3]u64{ 18368509115417119804, 11168725610120161972, 143061571777 },
[3]u64{ 7613923684154518587, 9580104948718508826, 193605457828 },
[3]u64{ 17984805084714865232, 16638722716909738765, 164519338529 },
[3]u64{ 4220802739051410373, 15732724012348272797, 33901986965 },
[3]u64{ 17812459042810815760, 12269722190021214142, 149852872677 },
[3]u64{ 10629526089664605307, 13110655916311972587, 229665142972 },
[3]u64{ 17437443267816548473, 6618112997062866867, 188710730081 },
[3]u64{ 12506371893701049304, 8457936459015989309, 97358768624 },
[3]u64{ 15737221540003030739, 3329167139937134914, 240458505654 },
[3]u64{ 2358380859011605513, 5245511557216705097, 182180474512 },
[3]u64{ 10042972713837039706, 5655931353280440466, 144284359751 },
[3]u64{ 13424397272769642495, 604622132328697393, 71306608653 },
[3]u64{ 6867102315755663029, 8673282619234652338, 13032776631 },
[3]u64{ 8690748404825506734, 16929477433058445690, 183470179592 },
[3]u64{ 956229930815387710, 11036952409253549455, 8917748810 },
[3]u64{ 7734449506297687888, 18199392190170386320, 74598314388 },
[3]u64{ 16332184961683848151, 9683116091880335715, 148986591027 },
[3]u64{ 15580777817612768828, 2993913337608915120, 51524922775 },
[3]u64{ 17404245271944696092, 4490779842162392585, 151162300367 },
[3]u64{ 13201420160494469229, 946849923353644618, 207243445663 },
[3]u64{ 16511717657124068078, 3613491058474899828, 159051328837 },
[3]u64{ 14131292492116594062, 14624054199004410935, 69195887742 },
[3]u64{ 18429136031865875691, 12088470271991908244, 126792771566 },
[3]u64{ 2563978348305862197, 10071980927725011290, 238655317286 },
[3]u64{ 14239974392147482896, 2833441711428854664, 38546003180 },
[3]u64{ 11164201396098998272, 17655572411864340446, 236153601182 },
[3]u64{ 7116971104932986880, 4997642792058747802, 158957110498 },
[3]u64{ 12437629862867369984, 11489200787635734848, 226270922758 },
[3]u64{ 16501893821638901760, 12983586226429536913, 6622830822 },
[3]u64{ 10649324268870959104, 12311150768725063152, 230703841619 },
[3]u64{ 7205759403792793600, 8530052476845967905, 83667388820 },
[3]u64{ 0, 6282736361499820264, 148462415071 },
[3]u64{ 0, 11337164765929082880, 223340587820 },
[3]u64{ 0, 8343856200414134272, 44614588933 },
[3]u64{ 0, 17889330377156198400, 5452321350 },
[3]u64{ 0, 17730714064155312128, 70969782542 },
[3]u64{ 0, 7449235258647511040, 14961183935 },
[3]u64{ 0, 9943947977234055168, 191403823852 },
[3]u64{ 0, 0, 236539062500 },
[3]u64{ 0, 0, 228000000000 },
[3]u64{ 3016823727048309817, 7394076, 0 },
[3]u64{ 17405973192644624358, 7394076163542341, 0 },
[3]u64{ 8937219978302591747, 12396245121240683569, 400833 },
[3]u64{ 15178463196824222317, 10248996648596888561, 193672001794 },
[3]u64{ 11979404627460330594, 11257495103713935002, 2555599221 },
[3]u64{ 2006448052689740002, 7555396579247433114, 117610270032 },
[3]u64{ 16330465320863239865, 4805022328730367462, 80409578869 },
[3]u64{ 17136208883957646553, 7056637817080232586, 117260480782 },
[3]u64{ 140455118208931867, 10811411483818434913, 14382541102 },
[3]u64{ 3964972929179372247, 16962406704495245447, 46586087790 },
[3]u64{ 3378050330022776379, 18074517319117194669, 110919533909 },
[3]u64{ 6065353437512901255, 3702019776117654523, 85979821547 },
[3]u64{ 12768753059854699889, 3551977551381082764, 235200686894 },
[3]u64{ 6848720690951013326, 16442608985936005282, 46192553088 },
[3]u64{ 10953228058585475132, 3580046275479139588, 128891355619 },
[3]u64{ 15539127852083296166, 8737412692712715330, 227194074697 },
[3]u64{ 14534853647735598497, 3082033243045084752, 73473656091 },
[3]u64{ 1506909603576368170, 16401023756841128699, 27167077356 },
[3]u64{ 5475702579938239025, 7520296082779572869, 236889101279 },
[3]u64{ 12039747373985783332, 9854104766152464159, 223407676067 },
[3]u64{ 17572399137760898460, 14169188802648310188, 163534192089 },
[3]u64{ 869552790852091236, 2018609909210367042, 217768113264 },
[3]u64{ 4549585778048181804, 8270271948267674359, 112109429062 },
[3]u64{ 4121918231767210357, 12320338602894572099, 70448332340 },
[3]u64{ 1558397953312543179, 17538536685990080547, 52667886893 },
[3]u64{ 6067524298738069781, 15833914616956760474, 45950765978 },
[3]u64{ 5811095224555517056, 6137696141415969855, 154858358231 },
[3]u64{ 6440894514158997188, 9757490468419438919, 215332725174 },
[3]u64{ 4612748874388784257, 3566639201356598903, 182528954618 },
[3]u64{ 9908101430749813367, 9760900035773954449, 250193347898 },
[3]u64{ 15150017990912190499, 3873778773990716438, 58529139451 },
[3]u64{ 17470426264690059239, 2295668377270167832, 251209997968 },
[3]u64{ 9615161096851907726, 1791721710912807593, 144124448432 },
[3]u64{ 9227932132124142224, 10571009006922683279, 176097129428 },
[3]u64{ 4794113194321211621, 9840791932778184867, 212573055546 },
[3]u64{ 391512698859146347, 11525464956561274613, 58533470399 },
[3]u64{ 17209658878068655842, 4435781488897895433, 191624796707 },
[3]u64{ 3077364726606876150, 6395563367070996741, 35240464196 },
[3]u64{ 1952989567673965814, 15538690795135662932, 68346704184 },
[3]u64{ 11172860676923186449, 16294558813563371936, 56842354115 },
[3]u64{ 17338078544784947239, 4942096228426070342, 195883329803 },
[3]u64{ 4593380466519703278, 6910116424372647153, 11267911573 },
[3]u64{ 786884753602720052, 17923400669760829478, 149374598161 },
[3]u64{ 17848875822468020539, 4134686917293039955, 17971629497 },
[3]u64{ 2899664567187130618, 16857102463116098681, 185224141826 },
[3]u64{ 2973178834961857409, 11364321508775167451, 2913825355 },
[3]u64{ 11117453141176836727, 7966947780972783899, 75616061103 },
[3]u64{ 7535238370146462002, 11261055695926686278, 175431889104 },
[3]u64{ 10246175467290865448, 9227040437353594058, 208610463052 },
[3]u64{ 1203128834127050464, 7185344074282882061, 76500198864 },
[3]u64{ 14518048959078919658, 14197856148610578032, 208389518282 },
[3]u64{ 1553474987376920024, 885688687260429427, 202769667324 },
[3]u64{ 14956572380830948369, 17407816160380305183, 252048013279 },
[3]u64{ 7594162606042048292, 17812728703806357349, 223943679604 },
[3]u64{ 14461296147288811288, 17120198191964319867, 116965629957 },
[3]u64{ 18305427728131488265, 12091952048375408786, 5928087803 },
[3]u64{ 10253208939347909876, 405056939269888281, 251655506034 },
[3]u64{ 6446028915490812012, 12485440679452408690, 114021958180 },
[3]u64{ 12986063676957432257, 8394369900823444407, 36676837095 },
[3]u64{ 9769714697972762807, 2877421667354294258, 231455059704 },
[3]u64{ 97429465146664592, 2676980714750756239, 248155985341 },
[3]u64{ 16395571728207795868, 6119309228579057021, 189145119415 },
[3]u64{ 6331668478323650406, 18203256146533333852, 183331728417 },
[3]u64{ 18129911846294207040, 351919978865493747, 33986800493 },
[3]u64{ 9890094564876124160, 5190010931882390570, 109019077620 },
[3]u64{ 12290856656987750400, 6982466386088036604, 244281351056 },
[3]u64{ 8498454992640802816, 4707293888784996898, 144378520261 },
[3]u64{ 5341660584200896512, 690306801165964760, 197255182913 },
[3]u64{ 9288674231451648000, 12456770961278956704, 65037421606 },
[3]u64{ 1152921504606846976, 16946092489294063943, 38675282906 },
[3]u64{ 0, 11098404173866185376, 218918649514 },
[3]u64{ 0, 15152070965853306880, 170601645695 },
[3]u64{ 0, 17370091362040414208, 127821395412 },
[3]u64{ 0, 10141938552171134976, 212941634539 },
[3]u64{ 0, 10586988556645826560, 235549795590 },
[3]u64{ 0, 12169852093061922816, 6573921799 },
[3]u64{ 0, 16717361816799281152, 7659729003 },
[3]u64{ 0, 0, 107906250000 },
[3]u64{ 0, 0, 16000000000 },
[3]u64{ 15212079674427582639, 112, 0 },
[3]u64{ 10179808126814248333, 112824648491, 0 },
[3]u64{ 6066766544199222848, 2144184049294538808, 6 },
[3]u64{ 6625308131806923532, 4108002197393276873, 6116236450 },
[3]u64{ 9122786786400665713, 6446230217393892753, 162222695245 },
[3]u64{ 11932880778639151320, 5571068025259989822, 77349450840 },
[3]u64{ 3884040911779255011, 14804812668872528331, 88302008202 },
[3]u64{ 13441817515637357872, 17369928488562523047, 138802570502 },
[3]u64{ 11628577856022352826, 2967474173531035027, 6941625710 },
[3]u64{ 13296656925520243654, 5291425437992807716, 110160867097 },
[3]u64{ 5020720704545399398, 14219547193739388064, 25286848747 },
[3]u64{ 14121973606499014694, 17720313647158217462, 235770843197 },
[3]u64{ 3642481034345420114, 12334850628290578491, 61960620127 },
[3]u64{ 9845536238569696768, 7818499847417334620, 95668673592 },
[3]u64{ 17655403572195686356, 136007040922198372, 56423841726 },
[3]u64{ 8377495365136654029, 8523477092112604449, 190007372956 },
[3]u64{ 13713682649609025426, 367934822655966629, 156462058619 },
[3]u64{ 1367709905452854731, 12964987687054730050, 123019945786 },
[3]u64{ 9981467701727208680, 15267036012420885462, 58702833390 },
[3]u64{ 6277920117543306205, 11142900264750765568, 238827627680 },
[3]u64{ 9344111460418701726, 13680181547777718603, 160604057833 },
[3]u64{ 4918507011364617264, 13001922925761426065, 233741604127 },
[3]u64{ 6554777203830755259, 2397730045956515935, 31704835654 },
[3]u64{ 4198262173120265648, 4482395522588406288, 70129981206 },
[3]u64{ 8080325935698446819, 3255525722490493080, 22242991148 },
[3]u64{ 12797633874200091733, 836222287193822098, 44176482403 },
[3]u64{ 8376502502208665497, 420898743993182306, 99045331701 },
[3]u64{ 9891973386793349173, 11652649973356574054, 245022816966 },
[3]u64{ 14877430279003795462, 15058402726661910231, 198631691420 },
[3]u64{ 8759933935842067041, 9600134495208339559, 156816317647 },
[3]u64{ 3753418510388703513, 14626343323989004842, 207520424333 },
[3]u64{ 2961383332545305985, 6813981265331086665, 141792895660 },
[3]u64{ 2497674184068629507, 10281745288790487888, 172369386664 },
[3]u64{ 15244544070742305452, 17569829347075761940, 168557374528 },
[3]u64{ 45953573565810823, 7654580675237889478, 64952462357 },
[3]u64{ 3960077421351906445, 16194838649686212364, 21414955649 },
[3]u64{ 3173330011013883118, 6495102772252453635, 129877923962 },
[3]u64{ 11026266219545759160, 14935159852819761348, 122352100226 },
[3]u64{ 8886757764964685632, 17381879863441579697, 130809636637 },
[3]u64{ 13952322129918090479, 9062335510435372583, 29942273595 },
[3]u64{ 4127250666614902202, 7569219009130126626, 59491270192 },
[3]u64{ 17649958504065306911, 12652124168176193362, 48410328184 },
[3]u64{ 13269305359002216873, 8940200224697247767, 120685873025 },
[3]u64{ 16236593433831947843, 5600570701927432884, 129484649225 },
[3]u64{ 13580930396682424057, 2018432801986093157, 9303607546 },
[3]u64{ 421976357197961116, 8235849749361824736, 250109419461 },
[3]u64{ 2962130818798626533, 9705097287982370040, 197446466309 },
[3]u64{ 8234383947306356345, 3517483139049842585, 5526114378 },
[3]u64{ 4380469931801381425, 958281614186777760, 74190683143 },
[3]u64{ 15279887469027055916, 7336473432636108950, 7051948550 },
[3]u64{ 8534542821713755552, 12955383920176764423, 6397711021 },
[3]u64{ 7814613482565088782, 10735469126281273789, 173702312769 },
[3]u64{ 13771954404705323224, 8637888232514730693, 65581970947 },
[3]u64{ 4568173274762548144, 6806336737533581000, 3468260859 },
[3]u64{ 8105292616250821343, 16142569672872330321, 251368972253 },
[3]u64{ 2923678426777275612, 8141285259947963513, 221875090455 },
[3]u64{ 1808633176918384049, 5220241098754220797, 23441339958 },
[3]u64{ 18118642609460438969, 154438799943119608, 54282989837 },
[3]u64{ 18138164175864360870, 2226876628677628879, 13008372144 },
[3]u64{ 4031433690465792404, 17219557081221357482, 176120719223 },
[3]u64{ 5012226396942308537, 15401507148161015114, 119933474059 },
[3]u64{ 7889712298793536835, 8842629766613985337, 11834917375 },
[3]u64{ 13500762396543628804, 3180100571546071440, 255479359920 },
[3]u64{ 501020624068841347, 7740848704392475044, 176172393597 },
[3]u64{ 8370653768288261750, 2014314126623495998, 125419632249 },
[3]u64{ 647579990023635200, 11209566016506885858, 121109196187 },
[3]u64{ 11106569307181154304, 7117166613733441125, 155607671791 },
[3]u64{ 10797461613892861952, 4197646860931880328, 239385822375 },
[3]u64{ 17627230675448889344, 5487263271238026094, 167227554892 },
[3]u64{ 12197735707942322176, 18148076225293562697, 76297465137 },
[3]u64{ 12871287735024877568, 9127276943027950849, 49983809183 },
[3]u64{ 4611686018427387904, 9691696125379324722, 159494790674 },
[3]u64{ 0, 13102362262487705216, 18525387899 },
[3]u64{ 0, 8929385439893192704, 123710280481 },
[3]u64{ 0, 11891353410743566336, 33484062954 },
[3]u64{ 0, 1587423090877399040, 234644631560 },
[3]u64{ 0, 3489137423026225152, 8086054378 },
[3]u64{ 0, 13046928120492326912, 234189146518 },
[3]u64{ 0, 11529215046068469760, 150707275390 },
[3]u64{ 0, 0, 126625000000 },
[3]u64{ 0, 0, 64000000000 },
[3]u64{ 9451803574512021605, 1721567, 0 },
[3]u64{ 8662766454758138424, 1721567512383298, 0 },
[3]u64{ 9207992007314947035, 6674960280855494694, 93326 },
[3]u64{ 17118602861291201802, 16378845781483497510, 142361850321 },
[3]u64{ 11186560605745599967, 17606907750956804392, 209887899008 },
[3]u64{ 10505549821532796847, 13225609159240506969, 128954472381 },
[3]u64{ 18133667530488679216, 2668084873338435252, 189716961709 },
[3]u64{ 10778135771244330799, 14802814305275861366, 173144637170 },
[3]u64{ 17087985777033767391, 8005510553372365574, 242802462171 },
[3]u64{ 2639185991757283040, 12748500143273514429, 219433979596 },
[3]u64{ 5401720287293896400, 10393733905569036127, 204691097577 },
[3]u64{ 9816495392633895233, 603389089974790339, 233563445444 },
[3]u64{ 10042051500090034990, 2033494532597735873, 196032709788 },
[3]u64{ 11629689537856384738, 9204796763694620958, 156110235959 },
[3]u64{ 2099086731766010483, 7826260310402107021, 55498993032 },
[3]u64{ 13665537898516458594, 10122690201685169383, 136424262421 },
[3]u64{ 16375672064669490764, 7438455564568110133, 21548752135 },
[3]u64{ 7770550512184564348, 2805412574380520817, 7403239484 },
[3]u64{ 6197048880720627314, 7250965427231182867, 60152081720 },
[3]u64{ 17963594118523106281, 8136242944826085924, 56393075623 },
[3]u64{ 8255454642407818663, 15357191647956011780, 167441066613 },
[3]u64{ 16744201957549498409, 7369614426695395460, 117832515027 },
[3]u64{ 17442505417202859722, 10886957545142526638, 211399507598 },
[3]u64{ 6383975767786687150, 2030047207417538097, 142590183151 },
[3]u64{ 15245442964998335795, 11557093828502314355, 239110049079 },
[3]u64{ 2910016124519524433, 15201062539664128543, 55626511311 },
[3]u64{ 3847913871169988463, 8846936323343880674, 207824051251 },
[3]u64{ 17210451512590059177, 1485291750116245364, 51479593379 },
[3]u64{ 17899408909991454145, 2076024439668322013, 163080517827 },
[3]u64{ 5920601932753251608, 7029497773682748741, 195112541510 },
[3]u64{ 16521781895108979744, 16333533921668749881, 70381069837 },
[3]u64{ 3697493405554698771, 2065057316131928423, 13885442648 },
[3]u64{ 2816108280295732065, 7800502648925570223, 88111946981 },
[3]u64{ 14251078772056398988, 17011619967093802015, 229422866095 },
[3]u64{ 4543066550096031417, 5368819344429198672, 175922201766 },
[3]u64{ 3099369389734296977, 15598879366754275267, 166291044279 },
[3]u64{ 5243484113636490986, 16393893486035835647, 183845616944 },
[3]u64{ 6823370511605197226, 12042046205096920307, 48888714746 },
[3]u64{ 11396290277624641942, 15437070428008474344, 250652800632 },
[3]u64{ 15934361408437566099, 13704569163204647509, 120836845264 },
[3]u64{ 14939272230935131954, 18192483750856993350, 208742926182 },
[3]u64{ 7500666177940329347, 5152535865317963250, 102986216520 },
[3]u64{ 4806714453065462270, 17512614083933854680, 72279319528 },
[3]u64{ 11557851247268441487, 14481918350603613536, 232949360711 },
[3]u64{ 10655523157206817381, 16124419709964004915, 71785066366 },
[3]u64{ 14769600176490881210, 18088011566435813579, 126874106543 },
[3]u64{ 16688495540925795167, 15008862380698848893, 175980553071 },
[3]u64{ 909793965395524173, 18160498644611827812, 111813632059 },
[3]u64{ 12724590949761703756, 3604680497457231965, 59984482604 },
[3]u64{ 10810739657314826395, 5957615565551495921, 44195410121 },
[3]u64{ 2431218615388671301, 17528455034961565995, 201322962986 },
[3]u64{ 4235001167959059286, 8503772325120113809, 42950219451 },
[3]u64{ 6253317787396334247, 8501492578048509537, 187460990421 },
[3]u64{ 9534525563070371898, 2296237701094386060, 213460866836 },
[3]u64{ 8392783992374030728, 3753593040591076946, 20124479295 },
[3]u64{ 16356257019231647540, 8518075399775653155, 63203482686 },
[3]u64{ 12896334001521091877, 12757855675959554597, 62461765792 },
[3]u64{ 1427636373320877084, 121631169379748595, 160691604742 },
[3]u64{ 16116755731295043521, 16679062494579173314, 6006593638 },
[3]u64{ 15945633911163986837, 10739912744743898054, 102904173789 },
[3]u64{ 7510154241072743838, 9367340677776287570, 221582211836 },
[3]u64{ 3571560509790395119, 12227321512794715397, 252507804555 },
[3]u64{ 3576991649007035076, 7241061891859170651, 139662844427 },
[3]u64{ 15509961892750732443, 13148571323079237489, 11392538751 },
[3]u64{ 17789791359353349378, 12509763434355012654, 127712785479 },
[3]u64{ 18331227331079738314, 11812768946960181977, 71678155634 },
[3]u64{ 15386712883100476416, 14170358803552564832, 114640371487 },
[3]u64{ 14082462055028752384, 18179989524780635952, 31768176689 },
[3]u64{ 12919043128765186048, 17091718978514754901, 49985539206 },
[3]u64{ 6125373368465096704, 7394768384359232459, 134926543942 },
[3]u64{ 12335992698065387520, 6778628272692852803, 70400871197 },
[3]u64{ 2774217370460225536, 18193335045875234320, 29367470174 },
[3]u64{ 0, 1378519212560967521, 94986262669 },
[3]u64{ 0, 4677732610631043584, 141074729676 },
[3]u64{ 0, 17296098591070486528, 204253580392 },
[3]u64{ 0, 7343735382392963072, 104937623383 },
[3]u64{ 0, 14525996728454217728, 87398104692 },
[3]u64{ 0, 9691359370008330240, 116787455860 },
[3]u64{ 0, 3044433348102455296, 116525369644 },
[3]u64{ 0, 9223372036854775808, 44165039062 },
[3]u64{ 0, 0, 214500000000 },
[3]u64{ 4962829537462579598, 26, 0 },
[3]u64{ 5711259460785241095, 26269035528, 0 },
[3]u64{ 13845894607204897444, 7822291454600056379, 1 },
[3]u64{ 12116633056637003327, 8201586317771250746, 1424047269 },
[3]u64{ 2965791047992089560, 3278889188817135834, 165444608885 },
[3]u64{ 16021997451315962529, 1710725240251040430, 117177748939 },
[3]u64{ 3942052271663803856, 1850175733663425006, 203092738601 },
[3]u64{ 15669876414782439922, 9147599666163914249, 41100298227 },
[3]u64{ 10594415915406145286, 10221885933644344166, 243495892371 },
[3]u64{ 10789820553031921377, 14901479793736678101, 147554129546 },
[3]u64{ 3989990218583987244, 5181831442059703136, 138807810838 },
[3]u64{ 2937341169808224563, 6396246577759793483, 22280907645 },
[3]u64{ 16267436558584536843, 14167229556464870447, 125346741221 },
[3]u64{ 16221580362814625793, 2969982933326311854, 229768007053 },
[3]u64{ 9695437602320209830, 7892677766222018881, 141161003097 },
[3]u64{ 10729753156793715126, 798698968922663621, 89427862919 },
[3]u64{ 2609241432056861929, 15926812109043458972, 135043297557 },
[3]u64{ 8462663743997037565, 8663842590352697437, 21863394214 },
[3]u64{ 14993422143908194069, 17093523026636671168, 166469667847 },
[3]u64{ 1307443894537745373, 839764004742743203, 7926641740 },
[3]u64{ 10017257439419829265, 16894643909298232323, 76045523697 },
[3]u64{ 16754772009970777891, 9066702926218949317, 241915860481 },
[3]u64{ 11722573031602862387, 9119392417260546810, 1491506950 },
[3]u64{ 7363764277467092384, 9723021096578315109, 6494363253 },
[3]u64{ 6733958494847390772, 14787464248751217597, 117527086029 },
[3]u64{ 8799796600227451045, 3733434565920249133, 205801630043 },
[3]u64{ 10512023194742249826, 6643788868836820841, 91202389893 },
[3]u64{ 4572542132337197059, 4729646697422664063, 133360160516 },
[3]u64{ 12600500455757416832, 4090144564201555829, 4256394661 },
[3]u64{ 7873789864743195199, 2109480737093400002, 165221727181 },
[3]u64{ 15724851676325671539, 16577155033369419739, 205114355179 },
[3]u64{ 8748017220462413167, 745377248603805917, 235898649375 },
[3]u64{ 14172589522760466448, 11305561465807999667, 31040406981 },
[3]u64{ 9520545591489413768, 2211245518782892177, 197612875715 },
[3]u64{ 12488551088392570222, 14170095199249735666, 195119871859 },
[3]u64{ 1135798823651241684, 17849973668116118927, 115768162399 },
[3]u64{ 11168725610120161972, 9020960204585720001, 95967649011 },
[3]u64{ 9580104948718508826, 10807134002871850916, 243489027232 },
[3]u64{ 16638722716909738765, 3925122626254791201, 160585855908 },
[3]u64{ 15732724012348272797, 17208463291312718997, 164212781323 },
[3]u64{ 12269722190021214142, 5145077219589447653, 11932872664 },
[3]u64{ 13110655916311972587, 17602397765035489468, 216278915194 },
[3]u64{ 6618112997062866867, 16422643262490753377, 122954227894 },
[3]u64{ 8457936459015989309, 2902509461400906224, 182890273275 },
[3]u64{ 3329167139937134914, 3422418805967265206, 251157345353 },
[3]u64{ 5245511557216705097, 4228874576277237392, 73185529695 },
[3]u64{ 5655931353280440466, 2553488530807495751, 95229247750 },
[3]u64{ 604622132328697393, 11546099176912486413, 6138424890 },
[3]u64{ 8673282619234652338, 10460791037534167991, 58625915290 },
[3]u64{ 16929477433058445690, 8127117908566000904, 154567080618 },
[3]u64{ 11036952409253549455, 11541304458088287306, 170440571944 },
[3]u64{ 18199392190170386320, 6249718665174839700, 40625655368 },
[3]u64{ 9683116091880335715, 13102508413386290995, 72338797927 },
[3]u64{ 2993913337608915120, 6274675218640661911, 103710288404 },
[3]u64{ 4490779842162392585, 3404497118599817167, 20340150825 },
[3]u64{ 946849923353644618, 11258566093988562335, 41184558158 },
[3]u64{ 3613491058474899828, 16762592482501635397, 78610328090 },
[3]u64{ 14624054199004410935, 5550125446725071998, 26908701959 },
[3]u64{ 12088470271991908244, 6370033225258510318, 7300872903 },
[3]u64{ 10071980927725011290, 1503521728674735398, 199345320193 },
[3]u64{ 2833441711428854664, 4250415082606384364, 1081506076 },
[3]u64{ 17655572411864340446, 6020091901030562974, 28230415463 },
[3]u64{ 4997642792058747802, 16288222967151527138, 103326349835 },
[3]u64{ 11489200787635734848, 6377016228656203782, 11882986336 },
[3]u64{ 12983586226429536913, 8378856515587563750, 96345698742 },
[3]u64{ 12311150768725063152, 15812881490200838483, 182454218721 },
[3]u64{ 8530052476845967905, 4548570371183413652, 225857218023 },
[3]u64{ 6282736361499820264, 16731431495283420383, 231246578493 },
[3]u64{ 11337164765929082880, 14737727629551135532, 61907012718 },
[3]u64{ 8343856200414134272, 12413722258104293893, 110798933815 },
[3]u64{ 17889330377156198400, 800899742400762438, 55672949232 },
[3]u64{ 17730714064155312128, 603197008376033550, 240043416862 },
[3]u64{ 7449235258647511040, 6380777281587743935, 30032699375 },
[3]u64{ 9943947977234055168, 10001440249018225388, 239345902629 },
[3]u64{ 0, 5505914461980436708, 37542179162 },
[3]u64{ 0, 1105464290051876864, 90298476221 },
[3]u64{ 0, 4500443576769970176, 189059927339 },
[3]u64{ 0, 2843045143185981440, 43243969535 },
[3]u64{ 0, 660949699682893824, 255154121786 },
[3]u64{ 0, 276549164618219520, 58035830155 },
[3]u64{ 0, 4683743612465315840, 139014991760 },
[3]u64{ 0, 0, 144253906250 },
[3]u64{ 0, 0, 74000000000 },
[3]u64{ 12396245121240683569, 400833, 0 },
[3]u64{ 10248996648596888561, 400833672001794, 0 },
[3]u64{ 11257495103713935002, 4370024159708535157, 21729 },
[3]u64{ 7555396579247433114, 7166684413908503888, 225236899484 },
[3]u64{ 4805022328730367462, 10217286283215687029, 156388506740 },
[3]u64{ 7056637817080232586, 4767369911989629198, 116553880199 },
[3]u64{ 10811411483818434913, 14407999214182082862, 135258439640 },
[3]u64{ 16962406704495245447, 8472271297615317358, 216781059202 },
[3]u64{ 18074517319117194669, 6236024012584764757, 130459282747 },
[3]u64{ 3702019776117654523, 1951826556984620523, 59338055539 },
[3]u64{ 3551977551381082764, 12357130551551830830, 115105808729 },
[3]u64{ 16442608985936005282, 8927758011099278464, 89669881389 },
[3]u64{ 3580046275479139588, 10199854049407140323, 45483974731 },
[3]u64{ 8737412692712715330, 17895455027038549577, 75552935195 },
[3]u64{ 3082033243045084752, 16539200343720527131, 27970114560 },
[3]u64{ 16401023756841128699, 3536976106235802604, 896591847 },
[3]u64{ 7520296082779572869, 16980391644793590751, 231191739858 },
[3]u64{ 9854104766152464159, 10090294316609084067, 210920508875 },
[3]u64{ 14169188802648310188, 17603457857266236889, 203546995950 },
[3]u64{ 2018609909210367042, 11164962743035868272, 238954285362 },
[3]u64{ 8270271948267674359, 1585686890718568774, 50605253843 },
[3]u64{ 12320338602894572099, 10882524700472655412, 211085960258 },
[3]u64{ 17538536685990080547, 2194808754940947757, 66589942846 },
[3]u64{ 15833914616956760474, 274100791137209242, 62118980821 },
[3]u64{ 6137696141415969855, 12203404582981010903, 213014859033 },
[3]u64{ 9757490468419438919, 541940706340938166, 25661547888 },
[3]u64{ 3566639201356598903, 10305434016011833594, 112029378664 },
[3]u64{ 9760900035773954449, 7900783531944543546, 104558658697 },
[3]u64{ 3873778773990716438, 8920818625012419323, 137428302333 },
[3]u64{ 2295668377270167832, 12532363335400447632, 253483598546 },
[3]u64{ 1791721710912807593, 13483507182924762800, 210679380777 },
[3]u64{ 10571009006922683279, 415911049779278804, 41730942389 },
[3]u64{ 9840791932778184867, 3441628281170127418, 181022546583 },
[3]u64{ 11525464956561274613, 17830811568183566527, 151186571042 },
[3]u64{ 4435781488897895433, 17897295813176613411, 34966610231 },
[3]u64{ 6395563367070996741, 2086148701331574596, 55970214350 },
[3]u64{ 15538690795135662932, 13015567826878853432, 206113090347 },
[3]u64{ 16294558813563371936, 12944531121587846595, 43705575345 },
[3]u64{ 4942096228426070342, 3534180912913737995, 177701724438 },
[3]u64{ 6910116424372647153, 3447584022400118677, 22191588331 },
[3]u64{ 17923400669760829478, 6375676813770849297, 235186893904 },
[3]u64{ 4134686917293039955, 11580694081479200185, 80345626132 },
[3]u64{ 16857102463116098681, 1872134358882196482, 20627790684 },
[3]u64{ 11364321508775167451, 17602652840520938059, 92101488606 },
[3]u64{ 7966947780972783899, 10331040597716338351, 222954241722 },
[3]u64{ 11261055695926686278, 73785407041056976, 186560046833 },
[3]u64{ 9227040437353594058, 17166209109167902028, 241003999914 },
[3]u64{ 7185344074282882061, 8762475644006589904, 170930582060 },
[3]u64{ 14197856148610578032, 8839001228645872586, 44475014756 },
[3]u64{ 885688687260429427, 13558262784529110268, 100479163216 },
[3]u64{ 17407816160380305183, 5640853896420358111, 80734994898 },
[3]u64{ 17812728703806357349, 8459930353450835572, 210305791302 },
[3]u64{ 17120198191964319867, 7643830211500171269, 70458613743 },
[3]u64{ 12091952048375408786, 1308629115231236347, 239414372866 },
[3]u64{ 405056939269888281, 8957268500971669618, 2070940926 },
[3]u64{ 12485440679452408690, 7645679094277669412, 254485574498 },
[3]u64{ 8394369900823444407, 3821107497040617191, 98414473094 },
[3]u64{ 2877421667354294258, 8847137191985934072, 134207142652 },
[3]u64{ 2676980714750756239, 3531126524756088253, 252479604268 },
[3]u64{ 6119309228579057021, 8726915034124352183, 44191422752 },
[3]u64{ 18203256146533333852, 17611136727168068641, 32473087011 },
[3]u64{ 351919978865493747, 18017743272784259949, 35954701634 },
[3]u64{ 5190010931882390570, 18113575006829616116, 66976743819 },
[3]u64{ 6982466386088036604, 12805550441678740368, 139981938868 },
[3]u64{ 4707293888784996898, 8061966093393027781, 180694190280 },
[3]u64{ 690306801165964760, 11954593141554100801, 200437040057 },
[3]u64{ 12456770961278956704, 14068656112359197734, 185648059792 },
[3]u64{ 16946092489294063943, 895878255770467290, 144762663376 },
[3]u64{ 11098404173866185376, 10319906489512197802, 208048565657 },
[3]u64{ 15152070965853306880, 14551142616794302079, 153559443251 },
[3]u64{ 17370091362040414208, 15933181735739307476, 51788819021 },
[3]u64{ 10141938552171134976, 11524527334398983147, 77863739512 },
[3]u64{ 10586988556645826560, 11828012606225556742, 120624745878 },
[3]u64{ 12169852093061922816, 3556238869349799431, 150641197848 },
[3]u64{ 16717361816799281152, 7403090230513381483, 24192784095 },
[3]u64{ 0, 10172292854665622800, 223401322325 },
[3]u64{ 0, 11240746576366182400, 85551441100 },
[3]u64{ 0, 17021927826892259328, 204609362092 },
[3]u64{ 0, 9046328496309141504, 172922760556 },
[3]u64{ 0, 8038996803112140800, 108490402450 },
[3]u64{ 0, 17098478935265509376, 146435794889 },
[3]u64{ 0, 7205759403792793600, 201926910400 },
[3]u64{ 0, 0, 192390625000 },
[3]u64{ 0, 0, 232000000000 },
[3]u64{ 2144184049294538808, 6, 0 },
[3]u64{ 4108002197393276873, 6116236450, 0 },
[3]u64{ 6446230217393892753, 6116236450222695245, 0 },
[3]u64{ 5571068025259989822, 6240972538554414168, 331561842 },
[3]u64{ 14804812668872528331, 4356262642990299018, 114338323799 },
[3]u64{ 17369928488562523047, 1335108558830511366, 87236153471 },
[3]u64{ 2967474173531035027, 18435704923261947246, 127072376379 },
[3]u64{ 5291425437992807716, 8395401931972636441, 59999401566 },
[3]u64{ 14219547193739388064, 12482665946362458347, 94455115650 },
[3]u64{ 17720313647158217462, 16101242875289374781, 130676686676 },
[3]u64{ 12334850628290578491, 4708983440241068127, 84872850125 },
[3]u64{ 7818499847417334620, 14856666972541426744, 205255274503 },
[3]u64{ 136007040922198372, 6938795288315789246, 7805381530 },
[3]u64{ 8523477092112604449, 5556307628265073820, 154376152846 },
[3]u64{ 367934822655966629, 1441404248927865979, 14301208040 },
[3]u64{ 12964987687054730050, 16710378912353838906, 232078138680 },
[3]u64{ 15267036012420885462, 18289940136919312110, 56905871455 },
[3]u64{ 11142900264750765568, 10217414145292657824, 95991499641 },
[3]u64{ 13680181547777718603, 12461165826430955753, 121553887130 },
[3]u64{ 13001922925761426065, 662762458988270879, 154675521153 },
[3]u64{ 2397730045956515935, 16488546856395302470, 129035928424 },
[3]u64{ 4482395522588406288, 2612816787977180950, 104893845916 },
[3]u64{ 3255525722490493080, 16446616379327454252, 156141641081 },
[3]u64{ 836222287193822098, 7842178508581740643, 121891572860 },
[3]u64{ 420898743993182306, 14779029861369369333, 124425125348 },
[3]u64{ 11652649973356574054, 2697664446153849542, 228801172814 },
[3]u64{ 15058402726661910231, 12135106444393649308, 78146240682 },
[3]u64{ 9600134495208339559, 9550285041205189839, 170657845438 },
[3]u64{ 14626343323989004842, 8790318168586740109, 190517721989 },
[3]u64{ 6813981265331086665, 14038474217155846828, 133476524102 },
[3]u64{ 10281745288790487888, 4263144264274812072, 70761027212 },
[3]u64{ 17569829347075761940, 11940456333341715520, 140231105513 },
[3]u64{ 7654580675237889478, 15751110736831573013, 233647293434 },
[3]u64{ 16194838649686212364, 18384528705472318081, 250853869423 },
[3]u64{ 6495102772252453635, 2393654818032310394, 111996627298 },
[3]u64{ 14935159852819761348, 12812209822018626434, 98129760287 },
[3]u64{ 17381879863441579697, 3110778569433458461, 31694551286 },
[3]u64{ 9062335510435372583, 2860264756226872891, 246168635644 },
[3]u64{ 7569219009130126626, 2384146980060315184, 252155055263 },
[3]u64{ 12652124168176193362, 14117430062880324728, 159129244866 },
[3]u64{ 8940200224697247767, 3769610173216737153, 194765307417 },
[3]u64{ 5600570701927432884, 17731974340232672009, 25204350976 },
[3]u64{ 2018432801986093157, 1971479303384713466, 961252255 },
[3]u64{ 8235849749361824736, 3449462959779012549, 159106874107 },
[3]u64{ 9705097287982370040, 13743454852043766533, 251186995761 },
[3]u64{ 3517483139049842585, 7417711187131879498, 49745034180 },
[3]u64{ 958281614186777760, 3650992383501007879, 196402114929 },
[3]u64{ 7336473432636108950, 12838770342493958662, 113197920693 },
[3]u64{ 12955383920176764423, 16025068246546338477, 181695991134 },
[3]u64{ 10735469126281273789, 6579965938260177729, 94868720690 },
[3]u64{ 8637888232514730693, 4742939430174291459, 50356700668 },
[3]u64{ 6806336737533581000, 13062256857527449083, 252257115261 },
[3]u64{ 16142569672872330321, 2301174570202439645, 125708106363 },
[3]u64{ 8141285259947963513, 7638687886069412887, 123124746923 },
[3]u64{ 5220241098754220797, 936322449610274358, 171414094100 },
[3]u64{ 154438799943119608, 12926010544311283981, 20050758141 },
[3]u64{ 2226876628677628879, 12647854908989899184, 253700720435 },
[3]u64{ 17219557081221357482, 8862093163358513015, 51685641588 },
[3]u64{ 15401507148161015114, 444784343917630731, 116480415033 },
[3]u64{ 8842629766613985337, 11033952249213387263, 57024111807 },
[3]u64{ 3180100571546071440, 18168634046363183536, 191598151749 },
[3]u64{ 7740848704392475044, 3837904761417065597, 69984923625 },
[3]u64{ 2014314126623495998, 111459007020906105, 233208053234 },
[3]u64{ 11209566016506885858, 16191761957496794523, 242006042204 },
[3]u64{ 7117166613733441125, 9856250800340378607, 92877757174 },
[3]u64{ 4197646860931880328, 9491800102275105959, 246534308426 },
[3]u64{ 5487263271238026094, 10777328578953608268, 74514551514 },
[3]u64{ 18148076225293562697, 17424440628313779505, 218584240152 },
[3]u64{ 9127276943027950849, 3285814872419755679, 24944580819 },
[3]u64{ 9691696125379324722, 2824823424107240978, 211178124381 },
[3]u64{ 13102362262487705216, 12271707680713669755, 93153133984 },
[3]u64{ 8929385439893192704, 6951481875178001185, 160665250606 },
[3]u64{ 11891353410743566336, 10202522487003824362, 46376840587 },
[3]u64{ 1587423090877399040, 4834668463880990728, 139553079852 },
[3]u64{ 3489137423026225152, 10871520987687904746, 44262087902 },
[3]u64{ 13046928120492326912, 12057698794225322390, 222589346333 },
[3]u64{ 11529215046068469760, 7263351819222681214, 29653649161 },
[3]u64{ 0, 1778055686910650944, 9393747091 },
[3]u64{ 0, 17108187120491986944, 147096388591 },
[3]u64{ 0, 3067636961549221888, 239927436682 },
[3]u64{ 0, 16702141595163557888, 138166296932 },
[3]u64{ 0, 2432053749942845440, 100905424910 },
[3]u64{ 0, 17791470327927144448, 14131841897 },
[3]u64{ 0, 1152921504606846976, 105964477539 },
[3]u64{ 0, 0, 99062500000 },
[3]u64{ 0, 0, 160000000000 },
[3]u64{ 6674960280855494694, 93326, 0 },
[3]u64{ 16378845781483497510, 93326361850321, 0 },
[3]u64{ 17606907750956804392, 4283581425266273664, 5059 },
[3]u64{ 13225609159240506969, 6725911039793895357, 195232213414 },
[3]u64{ 2668084873338435252, 1188689198788975021, 166364612368 },
[3]u64{ 14802814305275861366, 10825527435847761650, 16064438970 },
[3]u64{ 8005510553372365574, 3917696829526085083, 186586853018 },
[3]u64{ 12748500143273514429, 12646861173976387276, 154212378770 },
[3]u64{ 10393733905569036127, 18398576063183996905, 146685587717 },
[3]u64{ 603389089974790339, 16919251228485834948, 5997388806 },
[3]u64{ 2033494532597735873, 17296019588687185052, 6917194446 },
[3]u64{ 9204796763694620958, 12365301604512770359, 206937619100 },
[3]u64{ 7826260310402107021, 2814271599679204744, 156670324343 },
[3]u64{ 10122690201685169383, 2154994415780170517, 119152561969 },
[3]u64{ 7438455564568110133, 6717373824370072839, 49116822481 },
[3]u64{ 2805412574380520817, 12709155755801344060, 209364149564 },
[3]u64{ 7250965427231182867, 826847911966403896, 60688964714 },
[3]u64{ 8136242944826085924, 2277322703890025383, 106044823515 },
[3]u64{ 15357191647956011780, 2774508958389496437, 219123453911 },
[3]u64{ 7369614426695395460, 245697774950120915, 215150406432 },
[3]u64{ 10886957545142526638, 1268929063431863950, 32013319303 },
[3]u64{ 2030047207417538097, 6735665673159411439, 135068788782 },
[3]u64{ 11557093828502314355, 14734771742997073207, 46365141167 },
[3]u64{ 15201062539664128543, 13683287077957612495, 175798773576 },
[3]u64{ 8846936323343880674, 15370263741354826803, 72741772478 },
[3]u64{ 1485291750116245364, 48035913070297507, 190833223667 },
[3]u64{ 2076024439668322013, 1206547475966802115, 243002604032 },
[3]u64{ 7029497773682748741, 13512340386605768006, 65407069 },
[3]u64{ 16333533921668749881, 2325760467700278797, 93732505440 },
[3]u64{ 2065057316131928423, 10848110652847753816, 96126079727 },
[3]u64{ 7800502648925570223, 15846378960784301285, 239588077256 },
[3]u64{ 17011619967093802015, 14121839924449844911, 200859033924 },
[3]u64{ 5368819344429198672, 5147613424753296550, 68765546476 },
[3]u64{ 15598879366754275267, 16817040482828810167, 236279052682 },
[3]u64{ 16393893486035835647, 5773528746119363888, 138911653591 },
[3]u64{ 12042046205096920307, 8716201595536184826, 215312983620 },
[3]u64{ 15437070428008474344, 5259122109038474872, 68472506235 },
[3]u64{ 13704569163204647509, 14744540084230155984, 123285097580 },
[3]u64{ 18192483750856993350, 10719345477982635878, 108799303119 },
[3]u64{ 5152535865317963250, 13698037261310555208, 207581096882 },
[3]u64{ 17512614083933854680, 16141171632951976936, 178742572087 },
[3]u64{ 14481918350603613536, 10060790174955808839, 55875014667 },
[3]u64{ 16124419709964004915, 4250043307981877118, 11545396528 },
[3]u64{ 18088011566435813579, 7075646198054337199, 48230395309 },
[3]u64{ 15008862380698848893, 18141738384245531503, 173383571548 },
[3]u64{ 18160498644611827812, 8174370508376809531, 92983465608 },
[3]u64{ 3604680497457231965, 3581964982731575596, 136443133513 },
[3]u64{ 5957615565551495921, 14798509948722114761, 73194178710 },
[3]u64{ 17528455034961565995, 14713923334885122090, 150802228831 },
[3]u64{ 8503772325120113809, 5042978054260414139, 95797643382 },
[3]u64{ 8501492578048509537, 2052996319372883413, 118273380388 },
[3]u64{ 2296237701094386060, 8825683007899981588, 36111293153 },
[3]u64{ 3753593040591076946, 9992196755378745151, 225478441234 },
[3]u64{ 8518075399775653155, 9301073417573669950, 18541678071 },
[3]u64{ 12757855675959554597, 5331614769144850592, 247504212200 },
[3]u64{ 121631169379748595, 14354009428310052102, 232289027415 },
[3]u64{ 16679062494579173314, 5581221063029119078, 87778132410 },
[3]u64{ 10739912744743898054, 1529260335339476189, 186302558600 },
[3]u64{ 9367340677776287570, 16483061525949201148, 136082901368 },
[3]u64{ 12227321512794715397, 14431217812333089675, 120893548555 },
[3]u64{ 7241061891859170651, 3452349151135392267, 11782317885 },
[3]u64{ 13148571323079237489, 9075317899834447999, 61187152222 },
[3]u64{ 12509763434355012654, 2764331337978901575, 94491973969 },
[3]u64{ 11812768946960181977, 1942890683708857202, 81149854702 },
[3]u64{ 14170358803552564832, 165089169728028447, 238105324315 },
[3]u64{ 18179989524780635952, 15193620741871233073, 27008949501 },
[3]u64{ 17091718978514754901, 14995000835194145926, 253823647830 },
[3]u64{ 7394768384359232459, 1788823614552255558, 86812880624 },
[3]u64{ 6778628272692852803, 8384901184618498845, 240096972322 },
[3]u64{ 18193335045875234320, 405511217862281310, 34454546404 },
[3]u64{ 1378519212560967521, 3111530463755196557, 228021982807 },
[3]u64{ 4677732610631043584, 7893558450035460812, 87168676404 },
[3]u64{ 17296098591070486528, 156573858237402216, 52427910661 },
[3]u64{ 7343735382392963072, 15915324019419451223, 5008487885 },
[3]u64{ 14525996728454217728, 16293363012778802804, 205862771443 },
[3]u64{ 9691359370008330240, 14342105318291351412, 243883264978 },
[3]u64{ 3044433348102455296, 3788398842525387052, 210777487087 },
[3]u64{ 9223372036854775808, 14118764407048307670, 239205369512 },
[3]u64{ 0, 2705021334614720768, 168765379752 },
[3]u64{ 0, 7017988973805568000, 168146639500 },
[3]u64{ 0, 10956732053634154496, 140380445944 },
[3]u64{ 0, 14657517938546835456, 248593965634 },
[3]u64{ 0, 11268868284797157376, 66794585639 },
[3]u64{ 0, 14600669991935148032, 39610886573 },
[3]u64{ 0, 4611686018427387904, 173791503906 },
[3]u64{ 0, 0, 34250000000 },
[3]u64{ 0, 0, 128000000000 },
[3]u64{ 8201586317771250746, 1424047269, 0 },
[3]u64{ 3278889188817135834, 1424047269444608885, 0 },
[3]u64{ 1710725240251040430, 3001188830946823627, 77197757 },
[3]u64{ 1850175733663425006, 9732296932705387049, 189162694772 },
[3]u64{ 9147599666163914249, 16337535782679529459, 116527588873 },
[3]u64{ 10221885933644344166, 7969742269895046547, 9885659589 },
[3]u64{ 14901479793736678101, 2923592083903829642, 197432040594 },
[3]u64{ 5181831442059703136, 8144196241160608534, 146158488244 },
[3]u64{ 6396246577759793483, 16431078457793424253, 180441497762 },
[3]u64{ 14167229556464870447, 202362949592775653, 162890730548 },
[3]u64{ 2969982933326311854, 8835125248522947981, 52010970117 },
[3]u64{ 7892677766222018881, 7959873808777345113, 5478953099 },
[3]u64{ 798698968922663621, 14929747122315126151, 139431505623 },
[3]u64{ 15926812109043458972, 4310328817360515349, 215809343213 },
[3]u64{ 8663842590352697437, 7294899422760201126, 237233663393 },
[3]u64{ 17093523026636671168, 2047461597291187207, 161395457290 },
[3]u64{ 839764004742743203, 10942374468813517900, 10110993115 },
[3]u64{ 16894643909298232323, 10364795403063433969, 219593187308 },
[3]u64{ 9066702926218949317, 12330859528790939137, 236561876684 },
[3]u64{ 9119392417260546810, 8973160144879916806, 204668457234 },
[3]u64{ 9723021096578315109, 2895354388547509877, 18486435986 },
[3]u64{ 14787464248751217597, 16766844772497556429, 146156957475 },
[3]u64{ 3733434565920249133, 7442407174620948827, 35908932476 },
[3]u64{ 6643788868836820841, 6683013428676659077, 124403453701 },
[3]u64{ 4729646697422664063, 16713703375071907588, 5362286883 },
[3]u64{ 4090144564201555829, 8791044883080637861, 35906051675 },
[3]u64{ 2109480737093400002, 602844107089214413, 91476563498 },
[3]u64{ 16577155033369419739, 9754832281172880875, 42032680244 },
[3]u64{ 745377248603805917, 10587846778003503903, 52528810517 },
[3]u64{ 11305561465807999667, 17206244172922947013, 21573968323 },
[3]u64{ 2211245518782892177, 11620628420699303875, 195932752365 },
[3]u64{ 14170095199249735666, 17864732368219338611, 237629955528 },
[3]u64{ 17849973668116118927, 4146383014621345887, 200968449082 },
[3]u64{ 9020960204585720001, 11445705075042688243, 58224775873 },
[3]u64{ 10807134002871850916, 7369147888966546592, 193620472915 },
[3]u64{ 3925122626254791201, 9762476865090597796, 83399482307 },
[3]u64{ 17208463291312718997, 5507001428194242827, 195529224931 },
[3]u64{ 5145077219589447653, 11371471148365328344, 227298535145 },
[3]u64{ 17602397765035489468, 3148788104946538618, 233616448686 },
[3]u64{ 16422643262490753377, 3762722308424507574, 174170696145 },
[3]u64{ 2902509461400906224, 1156171244825745915, 209203977585 },
[3]u64{ 3422418805967265206, 14208921674868257865, 113062676168 },
[3]u64{ 4228874576277237392, 7903080886897905503, 200770267187 },
[3]u64{ 2553488530807495751, 6367240794154270982, 51428426873 },
[3]u64{ 11546099176912486413, 1623672396662369850, 121345168815 },
[3]u64{ 10460791037534167991, 18323231215381674394, 175088019456 },
[3]u64{ 8127117908566000904, 9842279843006544554, 993304354 },
[3]u64{ 11541304458088287306, 7376839231308610600, 34533551059 },
[3]u64{ 6249718665174839700, 609751749293657672, 211399899256 },
[3]u64{ 13102508413386290995, 10386457966860989799, 120033054708 },
[3]u64{ 6274675218640661911, 11160336020836149780, 244563051014 },
[3]u64{ 3404497118599817167, 17947559933847409193, 6605003027 },
[3]u64{ 11258566093988562335, 10229787001712704590, 19972939173 },
[3]u64{ 16762592482501635397, 10441677090043619866, 165554557864 },
[3]u64{ 5550125446725071998, 4996681336392922375, 168566044449 },
[3]u64{ 6370033225258510318, 124497102381021895, 33270870638 },
[3]u64{ 1503521728674735398, 8180812057779384577, 110006749001 },
[3]u64{ 4250415082606384364, 5294232873532946716, 73443482710 },
[3]u64{ 6020091901030562974, 2885620189169448039, 86287000939 },
[3]u64{ 16288222967151527138, 16662526875008170507, 107156429783 },
[3]u64{ 6377016228656203782, 15663095032402672480, 215903277391 },
[3]u64{ 8378856515587563750, 1824281504410546614, 79849098083 },
[3]u64{ 15812881490200838483, 9506565509584809953, 99098894498 },
[3]u64{ 4548570371183413652, 16941136942345070055, 162515351948 },
[3]u64{ 16731431495283420383, 15924115693705937725, 140918380873 },
[3]u64{ 14737727629551135532, 9247807690406628462, 73863248041 },
[3]u64{ 12413722258104293893, 7993916633864834871, 169501324659 },
[3]u64{ 800899742400762438, 1018504409177639408, 115433351089 },
[3]u64{ 603197008376033550, 12097800686634130718, 177055213234 },
[3]u64{ 6380777281587743935, 6221488888422637551, 178655823089 },
[3]u64{ 10001440249018225388, 8229322865256080421, 241337267588 },
[3]u64{ 5505914461980436708, 7927745108183101786, 132446112486 },
[3]u64{ 1105464290051876864, 8488683721235326653, 230429763923 },
[3]u64{ 4500443576769970176, 11165516518170922283, 83460172466 },
[3]u64{ 2843045143185981440, 5463648141113596927, 178605283863 },
[3]u64{ 660949699682893824, 3958440403860778042, 23296184959 },
[3]u64{ 276549164618219520, 5091534813990256011, 127214587484 },
[3]u64{ 4683743612465315840, 6100166970623291280, 92276012655 },
[3]u64{ 0, 1913011027739012426, 111330690714 },
[3]u64{ 0, 11310957650604221440, 154103704535 },
[3]u64{ 0, 16303817257009020928, 215613168242 },
[3]u64{ 0, 9090406322154766336, 114883831704 },
[3]u64{ 0, 3003279315069566976, 152492791914 },
[3]u64{ 0, 16582887146675765248, 106162808097 },
[3]u64{ 0, 9691746398101307392, 33898960113 },
[3]u64{ 0, 0, 241525390625 },
[3]u64{ 0, 0, 33000000000 },
};
// zig fmt: on
|
0 | repos/zig-ryu/src | repos/zig-ryu/src/ryu64/print_shortest.zig | // Copyright 2018 Ulf Adams
//
// The contents of this file may be used under the terms of the Apache License,
// Version 2.0.
//
// (See accompanying file LICENSE-Apache or copy at
// http://www.apache.org/licenses/LICENSE-2.0)
//
// Alternatively, the contents of this file may be used under the terms of
// the Boost Software License, Version 1.0.
// (See accompanying file LICENSE-Boost or copy at
// https://www.boost.org/LICENSE_1_0.txt)
//
// Unless required by applicable law or agreed to in writing, this software
// is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied.
const std = @import("std");
const builtin = @import("builtin");
usingnamespace struct {
pub usingnamespace @import("../internal.zig");
pub usingnamespace @import("tables_shortest.zig");
};
const ryu_optimize_size = false; //builtin.mode == builtin.Mode.ReleaseSmall;
pub fn mulShift(m: u64, mul: [2]u64, j: i32) u64 {
const b0 = @as(u128, m) * mul[0];
const b2 = @as(u128, m) * mul[1];
return @truncate(u64, (((b0 >> 64) + b2) >> @intCast(u7, (j - 64))));
}
pub fn mulShiftAll(m: u64, mul: [2]u64, j: i32, vp: *u64, vm: *u64, mm_shift: u32) u64 {
vp.* = mulShift(4 * m + 2, mul, j);
vm.* = mulShift(4 * m - 1 - mm_shift, mul, j);
return mulShift(4 * m, mul, j);
}
const Decimal64 = struct {
sign: bool,
mantissa: u64,
exponent: i32,
};
pub fn printShortest(result: []u8, f: f64) []u8 {
std.debug.assert(result.len >= 25);
const mantissa_bits = std.math.floatMantissaBits(f64);
const exponent_bits = std.math.floatExponentBits(f64);
const bits = @bitCast(u64, f);
const v = floatToDecimal(bits, mantissa_bits, exponent_bits, false);
const index = decimalToBuffer(v, result);
return result[0..index];
}
fn floatToDecimal(bits: u64, mantissa_bits: u6, exponent_bits: u6, explicit_leading_bit: bool) Decimal64 {
const exponent_bias = (@as(u64, 1) << (exponent_bits - 1)) - 1;
const sign = ((bits >> (mantissa_bits + exponent_bits)) & 1) != 0;
const mantissa = bits & ((@as(u64, 1) << mantissa_bits) - 1);
const exponent = (bits >> mantissa_bits) & ((@as(u64, 1) << exponent_bits) - 1);
// Filter out special case nan and inf
if (exponent == 0 and mantissa == 0) {
return Decimal64{
.sign = sign,
.mantissa = 0,
.exponent = 0,
};
}
if (exponent == ((@as(u64, 1) << exponent_bits) - 1)) {
return Decimal64{
.sign = sign,
.mantissa = if (explicit_leading_bit) mantissa & ((@as(u64, 1) << (mantissa_bits - 1)) - 1) else mantissa,
.exponent = 0x7fffffff,
};
}
var e2: i32 = undefined;
var m2: u64 = undefined;
// We subtract 2 so that the bounds computation has 2 additional bits.
if (explicit_leading_bit) {
// mantissa includes the explicit leading bit, so we need to correct for that here
if (exponent == 0) {
e2 = 1 - @intCast(i32, exponent_bias) - @intCast(i32, mantissa_bits) + 1 - 2;
} else {
e2 = @intCast(i32, exponent) - @intCast(i32, exponent_bias) - @intCast(i32, mantissa_bits) + 1 - 2;
}
m2 = mantissa;
} else {
if (exponent == 0) {
e2 = 1 - @intCast(i32, exponent_bias) - @intCast(i32, mantissa_bits) - 2;
m2 = mantissa;
} else {
e2 = @intCast(i32, exponent) - @intCast(i32, exponent_bias) - @intCast(i32, mantissa_bits) - 2;
m2 = (@as(u64, 1) << mantissa_bits) | mantissa;
}
}
const even = m2 & 1 == 0;
const accept_bounds = even;
// Step 2: Determine the interval of legal decimal representations.
const mv = 4 * m2;
// Implicit bool -> int conversion. True is 1, false is 0.
const mm_shift = mantissa != 0 or exponent <= 1;
// We would compute mp and mm like this:
// uint64_t mp = 4 * m2 + 2;
// uint64_t mm = mv - 1 - mm_shift;
// Step 3: Convert to a decimal power base using 128-bit arithmetic.
var vr: u64 = undefined;
var vp: u64 = undefined;
var vm: u64 = undefined;
var e10: i32 = undefined;
var vm_is_trailing_zeros = false;
var vr_is_trailing_zeros = false;
if (e2 >= 0) {
// I tried special-casing q == 0, but there was no effect on performance.
// This expression is slightly faster than max(0, log10Pow2(e2) - 1).
const q = @intCast(i32, log10Pow2(@intCast(u32, e2))) - @intCast(i32, @boolToInt(e2 > 3));
e10 = q;
const k = DOUBLE_POW5_INV_BITCOUNT + pow5Bits(@intCast(u32, q)) - 1;
const i = -e2 + @intCast(i32, q) + @intCast(i32, k);
if (ryu_optimize_size) {
var pow5: [2]u64 = undefined;
computeInvPow5(@intCast(u32, q), pow5[0..]);
vr = mulShiftAll(m2, pow5, i, &vp, &vm, @boolToInt(mm_shift));
} else {
vr = mulShiftAll(m2, DOUBLE_POW5_INV_SPLIT[@intCast(usize, q)], i, &vp, &vm, @boolToInt(mm_shift));
}
if (q <= 21) {
// This should use q <= 22, but I think 21 is also safe. Smaller values
// may still be safe, but it's more difficult to reason about them.
// Only one of mp, mv, and mm can be a multiple of 5, if any.
if (mv % 5 == 0) {
vr_is_trailing_zeros = multipleOfPowerOf5(mv, @intCast(u32, q));
} else if (accept_bounds) {
// Same as min(e2 + (~mm & 1), pow5Factor(mm)) >= q
// <=> e2 + (~mm & 1) >= q && pow5Factor(mm) >= q
// <=> true && pow5Factor(mm) >= q, since e2 >= q.
vm_is_trailing_zeros = multipleOfPowerOf5(mv - 1 - @boolToInt(mm_shift), @intCast(u32, q));
} else {
// Same as min(e2 + 1, pow5Factor(mp)) >= q.
vp -= @boolToInt(multipleOfPowerOf5(mv + 2, @intCast(u32, q)));
}
}
} else {
// This expression is slightly faster than max(0, log10Pow5(-e2) - 1).
const q = @intCast(i32, log10Pow5(@intCast(u32, -e2))) - @intCast(i32, @boolToInt(-e2 > 1));
e10 = q + e2;
const i = -e2 - q;
const k = @intCast(i32, pow5Bits(@intCast(u32, i))) - DOUBLE_POW5_BITCOUNT;
const j = q - k;
if (ryu_optimize_size) {
var pow5: [2]u64 = undefined;
computePow5(@intCast(u32, i), pow5[0..]);
vr = mulShiftAll(m2, pow5, j, &vp, &vm, @boolToInt(mm_shift));
} else {
vr = mulShiftAll(m2, DOUBLE_POW5_SPLIT[@intCast(usize, i)], j, &vp, &vm, @boolToInt(mm_shift));
}
if (q <= 1) {
// {vr,vp,vm} is trailing zeros if {mv,mp,mm} has at least q trailing 0 bits.
// mv = 4 m2, so it always has at least two trailing 0 bits.
vr_is_trailing_zeros = true;
if (accept_bounds) {
// mm = mv - 1 - mmShift, so it has 1 trailing 0 bit iff mmShift == 1.
vm_is_trailing_zeros = mm_shift;
} else {
vp -= 1;
}
} else if (q < 63) { // TODO(ulfjack): Use a tighter bound here.
// We need to compute min(ntz(mv), pow5Factor(mv) - e2) >= q-1
// <=> ntz(mv) >= q-1 && pow5Factor(mv) - e2 >= q-1
// <=> ntz(mv) >= q-1 (e2 is negative and -e2 >= q)
// <=> (mv & ((1 << (q-1)) - 1)) == 0
// We also need to make sure that the left shift does not overflow.
vr_is_trailing_zeros = (mv & ((@as(u64, 1) << @intCast(u6, q - 1)) - 1)) == 0;
}
}
// Step 4: Find the shortest decimal representation in the interval of legal representations.
var removed: u32 = 0;
var last_removed_digit: u8 = 0;
var output: u64 = undefined;
// On average, we remove ~2 digits.
if (vm_is_trailing_zeros or vr_is_trailing_zeros) {
// General case, which happens rarely (<1%).
while (vp / 10 > vm / 10) {
vm_is_trailing_zeros = vm_is_trailing_zeros and vm % 10 == 0;
vr_is_trailing_zeros = vr_is_trailing_zeros and last_removed_digit == 0;
last_removed_digit = @intCast(u8, vr % 10);
vr /= 10;
vp /= 10;
vm /= 10;
removed += 1;
}
if (vm_is_trailing_zeros) {
while (vm % 10 == 0) {
vr_is_trailing_zeros = vr_is_trailing_zeros and last_removed_digit == 0;
last_removed_digit = @intCast(u8, vr % 10);
vr /= 10;
vp /= 10;
vm /= 10;
removed += 1;
}
}
if (vr_is_trailing_zeros and (last_removed_digit == 5) and (vr % 2 == 0)) {
// Round even if the exact numbers is .....50..0.
last_removed_digit = 4;
}
// We need to take vr+1 if vr is outside bounds or we need to round up.
output = vr +
@boolToInt((vr == vm and (!accept_bounds or !vm_is_trailing_zeros)) or (last_removed_digit >= 5));
} else {
// Specialized for the common case (~99.3%). Percentags below are relative to this.
var round_up = false;
if (vp / 100 > vm / 100) { // Optimization: remove two digits at a time (~86.2%)
round_up = vr % 100 >= 50;
vr /= 100;
vp /= 100;
vm /= 100;
removed += 2;
}
// Loop iterations below (approximately), without optimization above:
// 0: 0.03%, 1: 13.8%, 2: 70.6%, 3: 14.0%, 4: 1.40%, 5: 0.14%, 6+: 0.02%
// Loop iterations below (approximately), with optimization above:
// 0: 70.6%, 1: 27.8%, 2: 1.40%, 3: 0.14%, 4+: 0.02%
while (vp / 10 > vm / 10) {
round_up = vr % 10 >= 5;
vr /= 10;
vp /= 10;
vm /= 10;
removed += 1;
}
// We need to take vr+1 if vr is outside bounds or we need to round up.
output = vr + @boolToInt(vr == vm or round_up);
}
var exp = e10 + @intCast(i32, removed);
return Decimal64{
.sign = sign,
.mantissa = output,
.exponent = exp,
};
}
pub fn copySpecialString(result: []u8, d: Decimal64) usize {
if (d.mantissa != 0) {
std.mem.copy(u8, result, "NaN");
return 3;
}
if (d.sign) {
result[0] = '-';
}
const offset: usize = @boolToInt(d.sign);
std.mem.copy(u8, result[offset..], "Infinity");
return offset + 8;
}
fn decimalToBuffer(v: Decimal64, result: []u8) usize {
if (v.exponent == 0x7fffffff) {
return copySpecialString(result, v);
}
// Step 5: Print the decimal representation.
var index: usize = 0;
if (v.sign) {
result[index] = '-';
index += 1;
}
var output = v.mantissa;
const olength = decimalLength17(output);
// Print the decimal digits. The following code is equivalent to:
//
// var i: usize = 0;
// while (i < olength - 1) : (i += 1) {
// const c = output % 10;
// output /= 10;
// result[index + olength - i] = @intCast(u8, '0' + c);
// }
// result[index] = @intCast(u8, '0' + output % 10);
var i: usize = 0;
// We prefer 32-bit operations, even on 64-bit platforms.
// We have at most 17 digits, and 32-bit unsigned int can store 9. We cut off
// 8 in the first iteration, so the remainder will fit into a 32-bit int.
if ((output >> 32) != 0) {
var output2 = @truncate(u32, output % 100000000);
output /= 100000000;
const c = output2 % 10000;
output2 /= 10000;
const d = output2 % 10000;
const c0 = (c % 100) << 1;
const c1 = (c / 100) << 1;
const d0 = (d % 100) << 1;
const d1 = (d / 100) << 1;
// TODO: See https://github.com/ziglang/zig/issues/1329
result[index + olength - i - 1 + 0] = DIGIT_TABLE[c0 + 0];
result[index + olength - i - 1 + 1] = DIGIT_TABLE[c0 + 1];
result[index + olength - i - 3 + 0] = DIGIT_TABLE[c1 + 0];
result[index + olength - i - 3 + 1] = DIGIT_TABLE[c1 + 1];
result[index + olength - i - 5 + 0] = DIGIT_TABLE[d0 + 0];
result[index + olength - i - 5 + 1] = DIGIT_TABLE[d0 + 1];
result[index + olength - i - 7 + 0] = DIGIT_TABLE[d1 + 0];
result[index + olength - i - 7 + 1] = DIGIT_TABLE[d1 + 1];
i += 8;
}
var output2 = @truncate(u32, output);
while (output2 >= 10000) {
const c = @truncate(u32, output2 % 10000);
output2 /= 10000;
const c0 = (c % 100) << 1;
const c1 = (c / 100) << 1;
result[index + olength - i - 1 + 0] = DIGIT_TABLE[c0 + 0];
result[index + olength - i - 1 + 1] = DIGIT_TABLE[c0 + 1];
result[index + olength - i - 3 + 0] = DIGIT_TABLE[c1 + 0];
result[index + olength - i - 3 + 1] = DIGIT_TABLE[c1 + 1];
i += 4;
}
if (output2 >= 100) {
const c = @truncate(u32, (output2 % 100) << 1);
output2 /= 100;
result[index + olength - i - 1 + 0] = DIGIT_TABLE[c + 0];
result[index + olength - i - 1 + 1] = DIGIT_TABLE[c + 1];
i += 2;
}
if (output2 >= 10) {
const c = @truncate(u32, output2 << 1);
// We can't use memcpy here: the decimal dot goes between these two digits.
result[index + olength - i] = DIGIT_TABLE[c + 1];
result[index] = DIGIT_TABLE[c];
} else {
result[index] = @intCast(u8, '0' + output2);
}
// Print decimal point if needed.
if (olength > 1) {
result[index + 1] = '.';
index += olength + 1;
} else {
index += 1;
}
// Print the exponent.
result[index] = 'E';
index += 1;
var exp = v.exponent + @intCast(i32, olength) - 1;
if (exp < 0) {
result[index] = '-';
index += 1;
exp = -exp;
}
const expu = @intCast(usize, exp);
if (expu >= 100) {
const c = @rem(expu, 10);
const offset2 = @intCast(usize, 2 * @divTrunc(expu, 10));
result[index + 0] = DIGIT_TABLE[offset2 + 0];
result[index + 1] = DIGIT_TABLE[offset2 + 1];
result[index + 2] = @intCast(u8, '0' + c);
index += 3;
} else if (expu >= 10) {
const offset2 = @intCast(usize, 2 * expu);
result[index + 0] = DIGIT_TABLE[offset2 + 0];
result[index + 1] = DIGIT_TABLE[offset2 + 1];
index += 2;
} else {
result[index] = @intCast(u8, '0' + expu);
index += 1;
}
return index;
}
|
0 | repos/zig-ryu/src | repos/zig-ryu/src/ryu64/tables_shortest.zig | // Copyright 2018 Ulf Adams
//
// The contents of this file may be used under the terms of the Apache License,
// Version 2.0.
//
// (See accompanying file LICENSE-Apache or copy at
// http://www.apache.org/licenses/LICENSE-2.0)
//
// Alternatively, the contents of this file may be used under the terms of
// the Boost Software License, Version 1.0.
// (See accompanying file LICENSE-Boost or copy at
// https://www.boost.org/LICENSE_1_0.txt)
//
// Unless required by applicable law or agreed to in writing, this software
// is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied.
// These tables are generated by PrintDoubleLookupTable.
pub const DOUBLE_POW5_INV_BITCOUNT = 125;
pub const DOUBLE_POW5_BITCOUNT = 125;
pub const DOUBLE_POW5_INV_TABLE_SIZE = 342;
pub const DOUBLE_POW5_TABLE_SIZE = 326;
// zig fmt: off
pub const DOUBLE_POW5_INV_SPLIT = [DOUBLE_POW5_INV_TABLE_SIZE][2]u64 {
[2]u64{ 1, 2305843009213693952 }, [2]u64{ 11068046444225730970, 1844674407370955161 },
[2]u64{ 5165088340638674453, 1475739525896764129 }, [2]u64{ 7821419487252849886, 1180591620717411303 },
[2]u64{ 8824922364862649494, 1888946593147858085 }, [2]u64{ 7059937891890119595, 1511157274518286468 },
[2]u64{ 13026647942995916322, 1208925819614629174 }, [2]u64{ 9774590264567735146, 1934281311383406679 },
[2]u64{ 11509021026396098440, 1547425049106725343 }, [2]u64{ 16585914450600699399, 1237940039285380274 },
[2]u64{ 15469416676735388068, 1980704062856608439 }, [2]u64{ 16064882156130220778, 1584563250285286751 },
[2]u64{ 9162556910162266299, 1267650600228229401 }, [2]u64{ 7281393426775805432, 2028240960365167042 },
[2]u64{ 16893161185646375315, 1622592768292133633 }, [2]u64{ 2446482504291369283, 1298074214633706907 },
[2]u64{ 7603720821608101175, 2076918743413931051 }, [2]u64{ 2393627842544570617, 1661534994731144841 },
[2]u64{ 16672297533003297786, 1329227995784915872 }, [2]u64{ 11918280793837635165, 2126764793255865396 },
[2]u64{ 5845275820328197809, 1701411834604692317 }, [2]u64{ 15744267100488289217, 1361129467683753853 },
[2]u64{ 3054734472329800808, 2177807148294006166 }, [2]u64{ 17201182836831481939, 1742245718635204932 },
[2]u64{ 6382248639981364905, 1393796574908163946 }, [2]u64{ 2832900194486363201, 2230074519853062314 },
[2]u64{ 5955668970331000884, 1784059615882449851 }, [2]u64{ 1075186361522890384, 1427247692705959881 },
[2]u64{ 12788344622662355584, 2283596308329535809 }, [2]u64{ 13920024512871794791, 1826877046663628647 },
[2]u64{ 3757321980813615186, 1461501637330902918 }, [2]u64{ 10384555214134712795, 1169201309864722334 },
[2]u64{ 5547241898389809503, 1870722095783555735 }, [2]u64{ 4437793518711847602, 1496577676626844588 },
[2]u64{ 10928932444453298728, 1197262141301475670 }, [2]u64{ 17486291911125277965, 1915619426082361072 },
[2]u64{ 6610335899416401726, 1532495540865888858 }, [2]u64{ 12666966349016942027, 1225996432692711086 },
[2]u64{ 12888448528943286597, 1961594292308337738 }, [2]u64{ 17689456452638449924, 1569275433846670190 },
[2]u64{ 14151565162110759939, 1255420347077336152 }, [2]u64{ 7885109000409574610, 2008672555323737844 },
[2]u64{ 9997436015069570011, 1606938044258990275 }, [2]u64{ 7997948812055656009, 1285550435407192220 },
[2]u64{ 12796718099289049614, 2056880696651507552 }, [2]u64{ 2858676849947419045, 1645504557321206042 },
[2]u64{ 13354987924183666206, 1316403645856964833 }, [2]u64{ 17678631863951955605, 2106245833371143733 },
[2]u64{ 3074859046935833515, 1684996666696914987 }, [2]u64{ 13527933681774397782, 1347997333357531989 },
[2]u64{ 10576647446613305481, 2156795733372051183 }, [2]u64{ 15840015586774465031, 1725436586697640946 },
[2]u64{ 8982663654677661702, 1380349269358112757 }, [2]u64{ 18061610662226169046, 2208558830972980411 },
[2]u64{ 10759939715039024913, 1766847064778384329 }, [2]u64{ 12297300586773130254, 1413477651822707463 },
[2]u64{ 15986332124095098083, 2261564242916331941 }, [2]u64{ 9099716884534168143, 1809251394333065553 },
[2]u64{ 14658471137111155161, 1447401115466452442 }, [2]u64{ 4348079280205103483, 1157920892373161954 },
[2]u64{ 14335624477811986218, 1852673427797059126 }, [2]u64{ 7779150767507678651, 1482138742237647301 },
[2]u64{ 2533971799264232598, 1185710993790117841 }, [2]u64{ 15122401323048503126, 1897137590064188545 },
[2]u64{ 12097921058438802501, 1517710072051350836 }, [2]u64{ 5988988032009131678, 1214168057641080669 },
[2]u64{ 16961078480698431330, 1942668892225729070 }, [2]u64{ 13568862784558745064, 1554135113780583256 },
[2]u64{ 7165741412905085728, 1243308091024466605 }, [2]u64{ 11465186260648137165, 1989292945639146568 },
[2]u64{ 16550846638002330379, 1591434356511317254 }, [2]u64{ 16930026125143774626, 1273147485209053803 },
[2]u64{ 4951948911778577463, 2037035976334486086 }, [2]u64{ 272210314680951647, 1629628781067588869 },
[2]u64{ 3907117066486671641, 1303703024854071095 }, [2]u64{ 6251387306378674625, 2085924839766513752 },
[2]u64{ 16069156289328670670, 1668739871813211001 }, [2]u64{ 9165976216721026213, 1334991897450568801 },
[2]u64{ 7286864317269821294, 2135987035920910082 }, [2]u64{ 16897537898041588005, 1708789628736728065 },
[2]u64{ 13518030318433270404, 1367031702989382452 }, [2]u64{ 6871453250525591353, 2187250724783011924 },
[2]u64{ 9186511415162383406, 1749800579826409539 }, [2]u64{ 11038557946871817048, 1399840463861127631 },
[2]u64{ 10282995085511086630, 2239744742177804210 }, [2]u64{ 8226396068408869304, 1791795793742243368 },
[2]u64{ 13959814484210916090, 1433436634993794694 }, [2]u64{ 11267656730511734774, 2293498615990071511 },
[2]u64{ 5324776569667477496, 1834798892792057209 }, [2]u64{ 7949170070475892320, 1467839114233645767 },
[2]u64{ 17427382500606444826, 1174271291386916613 }, [2]u64{ 5747719112518849781, 1878834066219066582 },
[2]u64{ 15666221734240810795, 1503067252975253265 }, [2]u64{ 12532977387392648636, 1202453802380202612 },
[2]u64{ 5295368560860596524, 1923926083808324180 }, [2]u64{ 4236294848688477220, 1539140867046659344 },
[2]u64{ 7078384693692692099, 1231312693637327475 }, [2]u64{ 11325415509908307358, 1970100309819723960 },
[2]u64{ 9060332407926645887, 1576080247855779168 }, [2]u64{ 14626963555825137356, 1260864198284623334 },
[2]u64{ 12335095245094488799, 2017382717255397335 }, [2]u64{ 9868076196075591040, 1613906173804317868 },
[2]u64{ 15273158586344293478, 1291124939043454294 }, [2]u64{ 13369007293925138595, 2065799902469526871 },
[2]u64{ 7005857020398200553, 1652639921975621497 }, [2]u64{ 16672732060544291412, 1322111937580497197 },
[2]u64{ 11918976037903224966, 2115379100128795516 }, [2]u64{ 5845832015580669650, 1692303280103036413 },
[2]u64{ 12055363241948356366, 1353842624082429130 }, [2]u64{ 841837113407818570, 2166148198531886609 },
[2]u64{ 4362818505468165179, 1732918558825509287 }, [2]u64{ 14558301248600263113, 1386334847060407429 },
[2]u64{ 12225235553534690011, 2218135755296651887 }, [2]u64{ 2401490813343931363, 1774508604237321510 },
[2]u64{ 1921192650675145090, 1419606883389857208 }, [2]u64{ 17831303500047873437, 2271371013423771532 },
[2]u64{ 6886345170554478103, 1817096810739017226 }, [2]u64{ 1819727321701672159, 1453677448591213781 },
[2]u64{ 16213177116328979020, 1162941958872971024 }, [2]u64{ 14873036941900635463, 1860707134196753639 },
[2]u64{ 15587778368262418694, 1488565707357402911 }, [2]u64{ 8780873879868024632, 1190852565885922329 },
[2]u64{ 2981351763563108441, 1905364105417475727 }, [2]u64{ 13453127855076217722, 1524291284333980581 },
[2]u64{ 7073153469319063855, 1219433027467184465 }, [2]u64{ 11317045550910502167, 1951092843947495144 },
[2]u64{ 12742985255470312057, 1560874275157996115 }, [2]u64{ 10194388204376249646, 1248699420126396892 },
[2]u64{ 1553625868034358140, 1997919072202235028 }, [2]u64{ 8621598323911307159, 1598335257761788022 },
[2]u64{ 17965325103354776697, 1278668206209430417 }, [2]u64{ 13987124906400001422, 2045869129935088668 },
[2]u64{ 121653480894270168, 1636695303948070935 }, [2]u64{ 97322784715416134, 1309356243158456748 },
[2]u64{ 14913111714512307107, 2094969989053530796 }, [2]u64{ 8241140556867935363, 1675975991242824637 },
[2]u64{ 17660958889720079260, 1340780792994259709 }, [2]u64{ 17189487779326395846, 2145249268790815535 },
[2]u64{ 13751590223461116677, 1716199415032652428 }, [2]u64{ 18379969808252713988, 1372959532026121942 },
[2]u64{ 14650556434236701088, 2196735251241795108 }, [2]u64{ 652398703163629901, 1757388200993436087 },
[2]u64{ 11589965406756634890, 1405910560794748869 }, [2]u64{ 7475898206584884855, 2249456897271598191 },
[2]u64{ 2291369750525997561, 1799565517817278553 }, [2]u64{ 9211793429904618695, 1439652414253822842 },
[2]u64{ 18428218302589300235, 2303443862806116547 }, [2]u64{ 7363877012587619542, 1842755090244893238 },
[2]u64{ 13269799239553916280, 1474204072195914590 }, [2]u64{ 10615839391643133024, 1179363257756731672 },
[2]u64{ 2227947767661371545, 1886981212410770676 }, [2]u64{ 16539753473096738529, 1509584969928616540 },
[2]u64{ 13231802778477390823, 1207667975942893232 }, [2]u64{ 6413489186596184024, 1932268761508629172 },
[2]u64{ 16198837793502678189, 1545815009206903337 }, [2]u64{ 5580372605318321905, 1236652007365522670 },
[2]u64{ 8928596168509315048, 1978643211784836272 }, [2]u64{ 18210923379033183008, 1582914569427869017 },
[2]u64{ 7190041073742725760, 1266331655542295214 }, [2]u64{ 436019273762630246, 2026130648867672343 },
[2]u64{ 7727513048493924843, 1620904519094137874 }, [2]u64{ 9871359253537050198, 1296723615275310299 },
[2]u64{ 4726128361433549347, 2074757784440496479 }, [2]u64{ 7470251503888749801, 1659806227552397183 },
[2]u64{ 13354898832594820487, 1327844982041917746 }, [2]u64{ 13989140502667892133, 2124551971267068394 },
[2]u64{ 14880661216876224029, 1699641577013654715 }, [2]u64{ 11904528973500979224, 1359713261610923772 },
[2]u64{ 4289851098633925465, 2175541218577478036 }, [2]u64{ 18189276137874781665, 1740432974861982428 },
[2]u64{ 3483374466074094362, 1392346379889585943 }, [2]u64{ 1884050330976640656, 2227754207823337509 },
[2]u64{ 5196589079523222848, 1782203366258670007 }, [2]u64{ 15225317707844309248, 1425762693006936005 },
[2]u64{ 5913764258841343181, 2281220308811097609 }, [2]u64{ 8420360221814984868, 1824976247048878087 },
[2]u64{ 17804334621677718864, 1459980997639102469 }, [2]u64{ 17932816512084085415, 1167984798111281975 },
[2]u64{ 10245762345624985047, 1868775676978051161 }, [2]u64{ 4507261061758077715, 1495020541582440929 },
[2]u64{ 7295157664148372495, 1196016433265952743 }, [2]u64{ 7982903447895485668, 1913626293225524389 },
[2]u64{ 10075671573058298858, 1530901034580419511 }, [2]u64{ 4371188443704728763, 1224720827664335609 },
[2]u64{ 14372599139411386667, 1959553324262936974 }, [2]u64{ 15187428126271019657, 1567642659410349579 },
[2]u64{ 15839291315758726049, 1254114127528279663 }, [2]u64{ 3206773216762499739, 2006582604045247462 },
[2]u64{ 13633465017635730761, 1605266083236197969 }, [2]u64{ 14596120828850494932, 1284212866588958375 },
[2]u64{ 4907049252451240275, 2054740586542333401 }, [2]u64{ 236290587219081897, 1643792469233866721 },
[2]u64{ 14946427728742906810, 1315033975387093376 }, [2]u64{ 16535586736504830250, 2104054360619349402 },
[2]u64{ 5849771759720043554, 1683243488495479522 }, [2]u64{ 15747863852001765813, 1346594790796383617 },
[2]u64{ 10439186904235184007, 2154551665274213788 }, [2]u64{ 15730047152871967852, 1723641332219371030 },
[2]u64{ 12584037722297574282, 1378913065775496824 }, [2]u64{ 9066413911450387881, 2206260905240794919 },
[2]u64{ 10942479943902220628, 1765008724192635935 }, [2]u64{ 8753983955121776503, 1412006979354108748 },
[2]u64{ 10317025513452932081, 2259211166966573997 }, [2]u64{ 874922781278525018, 1807368933573259198 },
[2]u64{ 8078635854506640661, 1445895146858607358 }, [2]u64{ 13841606313089133175, 1156716117486885886 },
[2]u64{ 14767872471458792434, 1850745787979017418 }, [2]u64{ 746251532941302978, 1480596630383213935 },
[2]u64{ 597001226353042382, 1184477304306571148 }, [2]u64{ 15712597221132509104, 1895163686890513836 },
[2]u64{ 8880728962164096960, 1516130949512411069 }, [2]u64{ 10793931984473187891, 1212904759609928855 },
[2]u64{ 17270291175157100626, 1940647615375886168 }, [2]u64{ 2748186495899949531, 1552518092300708935 },
[2]u64{ 2198549196719959625, 1242014473840567148 }, [2]u64{ 18275073973719576693, 1987223158144907436 },
[2]u64{ 10930710364233751031, 1589778526515925949 }, [2]u64{ 12433917106128911148, 1271822821212740759 },
[2]u64{ 8826220925580526867, 2034916513940385215 }, [2]u64{ 7060976740464421494, 1627933211152308172 },
[2]u64{ 16716827836597268165, 1302346568921846537 }, [2]u64{ 11989529279587987770, 2083754510274954460 },
[2]u64{ 9591623423670390216, 1667003608219963568 }, [2]u64{ 15051996368420132820, 1333602886575970854 },
[2]u64{ 13015147745246481542, 2133764618521553367 }, [2]u64{ 3033420566713364587, 1707011694817242694 },
[2]u64{ 6116085268112601993, 1365609355853794155 }, [2]u64{ 9785736428980163188, 2184974969366070648 },
[2]u64{ 15207286772667951197, 1747979975492856518 }, [2]u64{ 1097782973908629988, 1398383980394285215 },
[2]u64{ 1756452758253807981, 2237414368630856344 }, [2]u64{ 5094511021344956708, 1789931494904685075 },
[2]u64{ 4075608817075965366, 1431945195923748060 }, [2]u64{ 6520974107321544586, 2291112313477996896 },
[2]u64{ 1527430471115325346, 1832889850782397517 }, [2]u64{ 12289990821117991246, 1466311880625918013 },
[2]u64{ 17210690286378213644, 1173049504500734410 }, [2]u64{ 9090360384495590213, 1876879207201175057 },
[2]u64{ 18340334751822203140, 1501503365760940045 }, [2]u64{ 14672267801457762512, 1201202692608752036 },
[2]u64{ 16096930852848599373, 1921924308174003258 }, [2]u64{ 1809498238053148529, 1537539446539202607 },
[2]u64{ 12515645034668249793, 1230031557231362085 }, [2]u64{ 1578287981759648052, 1968050491570179337 },
[2]u64{ 12330676829633449412, 1574440393256143469 }, [2]u64{ 13553890278448669853, 1259552314604914775 },
[2]u64{ 3239480371808320148, 2015283703367863641 }, [2]u64{ 17348979556414297411, 1612226962694290912 },
[2]u64{ 6500486015647617283, 1289781570155432730 }, [2]u64{ 10400777625036187652, 2063650512248692368 },
[2]u64{ 15699319729512770768, 1650920409798953894 }, [2]u64{ 16248804598352126938, 1320736327839163115 },
[2]u64{ 7551343283653851484, 2113178124542660985 }, [2]u64{ 6041074626923081187, 1690542499634128788 },
[2]u64{ 12211557331022285596, 1352433999707303030 }, [2]u64{ 1091747655926105338, 2163894399531684849 },
[2]u64{ 4562746939482794594, 1731115519625347879 }, [2]u64{ 7339546366328145998, 1384892415700278303 },
[2]u64{ 8053925371383123274, 2215827865120445285 }, [2]u64{ 6443140297106498619, 1772662292096356228 },
[2]u64{ 12533209867169019542, 1418129833677084982 }, [2]u64{ 5295740528502789974, 2269007733883335972 },
[2]u64{ 15304638867027962949, 1815206187106668777 }, [2]u64{ 4865013464138549713, 1452164949685335022 },
[2]u64{ 14960057215536570740, 1161731959748268017 }, [2]u64{ 9178696285890871890, 1858771135597228828 },
[2]u64{ 14721654658196518159, 1487016908477783062 }, [2]u64{ 4398626097073393881, 1189613526782226450 },
[2]u64{ 7037801755317430209, 1903381642851562320 }, [2]u64{ 5630241404253944167, 1522705314281249856 },
[2]u64{ 814844308661245011, 1218164251424999885 }, [2]u64{ 1303750893857992017, 1949062802279999816 },
[2]u64{ 15800395974054034906, 1559250241823999852 }, [2]u64{ 5261619149759407279, 1247400193459199882 },
[2]u64{ 12107939454356961969, 1995840309534719811 }, [2]u64{ 5997002748743659252, 1596672247627775849 },
[2]u64{ 8486951013736837725, 1277337798102220679 }, [2]u64{ 2511075177753209390, 2043740476963553087 },
[2]u64{ 13076906586428298482, 1634992381570842469 }, [2]u64{ 14150874083884549109, 1307993905256673975 },
[2]u64{ 4194654460505726958, 2092790248410678361 }, [2]u64{ 18113118827372222859, 1674232198728542688 },
[2]u64{ 3422448617672047318, 1339385758982834151 }, [2]u64{ 16543964232501006678, 2143017214372534641 },
[2]u64{ 9545822571258895019, 1714413771498027713 }, [2]u64{ 15015355686490936662, 1371531017198422170 },
[2]u64{ 5577825024675947042, 2194449627517475473 }, [2]u64{ 11840957649224578280, 1755559702013980378 },
[2]u64{ 16851463748863483271, 1404447761611184302 }, [2]u64{ 12204946739213931940, 2247116418577894884 },
[2]u64{ 13453306206113055875, 1797693134862315907 }, [2]u64{ 3383947335406624054, 1438154507889852726 },
[2]u64{ 16482362180876329456, 2301047212623764361 }, [2]u64{ 9496540929959153242, 1840837770099011489 },
[2]u64{ 11286581558709232917, 1472670216079209191 }, [2]u64{ 5339916432225476010, 1178136172863367353 },
[2]u64{ 4854517476818851293, 1885017876581387765 }, [2]u64{ 3883613981455081034, 1508014301265110212 },
[2]u64{ 14174937629389795797, 1206411441012088169 }, [2]u64{ 11611853762797942306, 1930258305619341071 },
[2]u64{ 5600134195496443521, 1544206644495472857 }, [2]u64{ 15548153800622885787, 1235365315596378285 },
[2]u64{ 6430302007287065643, 1976584504954205257 }, [2]u64{ 16212288050055383484, 1581267603963364205 },
[2]u64{ 12969830440044306787, 1265014083170691364 }, [2]u64{ 9683682259845159889, 2024022533073106183 },
[2]u64{ 15125643437359948558, 1619218026458484946 }, [2]u64{ 8411165935146048523, 1295374421166787957 },
[2]u64{ 17147214310975587960, 2072599073866860731 }, [2]u64{ 10028422634038560045, 1658079259093488585 },
[2]u64{ 8022738107230848036, 1326463407274790868 }, [2]u64{ 9147032156827446534, 2122341451639665389 },
[2]u64{ 11006974540203867551, 1697873161311732311 }, [2]u64{ 5116230817421183718, 1358298529049385849 },
[2]u64{ 15564666937357714594, 2173277646479017358 }, [2]u64{ 1383687105660440706, 1738622117183213887 },
[2]u64{ 12174996128754083534, 1390897693746571109 }, [2]u64{ 8411947361780802685, 2225436309994513775 },
[2]u64{ 6729557889424642148, 1780349047995611020 }, [2]u64{ 5383646311539713719, 1424279238396488816 },
[2]u64{ 1235136468979721303, 2278846781434382106 }, [2]u64{ 15745504434151418335, 1823077425147505684 },
[2]u64{ 16285752362063044992, 1458461940118004547 }, [2]u64{ 5649904260166615347, 1166769552094403638 },
[2]u64{ 5350498001524674232, 1866831283351045821 }, [2]u64{ 591049586477829062, 1493465026680836657 },
[2]u64{ 11540886113407994219, 1194772021344669325 }, [2]u64{ 18673707743239135, 1911635234151470921 },
[2]u64{ 14772334225162232601, 1529308187321176736 }, [2]u64{ 8128518565387875758, 1223446549856941389 },
[2]u64{ 1937583260394870242, 1957514479771106223 }, [2]u64{ 8928764237799716840, 1566011583816884978 },
[2]u64{ 14521709019723594119, 1252809267053507982 }, [2]u64{ 8477339172590109297, 2004494827285612772 },
[2]u64{ 17849917782297818407, 1603595861828490217 }, [2]u64{ 6901236596354434079, 1282876689462792174 },
[2]u64{ 18420676183650915173, 2052602703140467478 }, [2]u64{ 3668494502695001169, 1642082162512373983 },
[2]u64{ 10313493231639821582, 1313665730009899186 }, [2]u64{ 9122891541139893884, 2101865168015838698 },
[2]u64{ 14677010862395735754, 1681492134412670958 }, [2]u64{ 673562245690857633, 1345193707530136767 }
};
pub const DOUBLE_POW5_SPLIT = [DOUBLE_POW5_TABLE_SIZE][2]u64 {
[2]u64{ 0, 1152921504606846976 }, [2]u64{ 0, 1441151880758558720 },
[2]u64{ 0, 1801439850948198400 }, [2]u64{ 0, 2251799813685248000 },
[2]u64{ 0, 1407374883553280000 }, [2]u64{ 0, 1759218604441600000 },
[2]u64{ 0, 2199023255552000000 }, [2]u64{ 0, 1374389534720000000 },
[2]u64{ 0, 1717986918400000000 }, [2]u64{ 0, 2147483648000000000 },
[2]u64{ 0, 1342177280000000000 }, [2]u64{ 0, 1677721600000000000 },
[2]u64{ 0, 2097152000000000000 }, [2]u64{ 0, 1310720000000000000 },
[2]u64{ 0, 1638400000000000000 }, [2]u64{ 0, 2048000000000000000 },
[2]u64{ 0, 1280000000000000000 }, [2]u64{ 0, 1600000000000000000 },
[2]u64{ 0, 2000000000000000000 }, [2]u64{ 0, 1250000000000000000 },
[2]u64{ 0, 1562500000000000000 }, [2]u64{ 0, 1953125000000000000 },
[2]u64{ 0, 1220703125000000000 }, [2]u64{ 0, 1525878906250000000 },
[2]u64{ 0, 1907348632812500000 }, [2]u64{ 0, 1192092895507812500 },
[2]u64{ 0, 1490116119384765625 }, [2]u64{ 4611686018427387904, 1862645149230957031 },
[2]u64{ 9799832789158199296, 1164153218269348144 }, [2]u64{ 12249790986447749120, 1455191522836685180 },
[2]u64{ 15312238733059686400, 1818989403545856475 }, [2]u64{ 14528612397897220096, 2273736754432320594 },
[2]u64{ 13692068767113150464, 1421085471520200371 }, [2]u64{ 12503399940464050176, 1776356839400250464 },
[2]u64{ 15629249925580062720, 2220446049250313080 }, [2]u64{ 9768281203487539200, 1387778780781445675 },
[2]u64{ 7598665485932036096, 1734723475976807094 }, [2]u64{ 274959820560269312, 2168404344971008868 },
[2]u64{ 9395221924704944128, 1355252715606880542 }, [2]u64{ 2520655369026404352, 1694065894508600678 },
[2]u64{ 12374191248137781248, 2117582368135750847 }, [2]u64{ 14651398557727195136, 1323488980084844279 },
[2]u64{ 13702562178731606016, 1654361225106055349 }, [2]u64{ 3293144668132343808, 2067951531382569187 },
[2]u64{ 18199116482078572544, 1292469707114105741 }, [2]u64{ 8913837547316051968, 1615587133892632177 },
[2]u64{ 15753982952572452864, 2019483917365790221 }, [2]u64{ 12152082354571476992, 1262177448353618888 },
[2]u64{ 15190102943214346240, 1577721810442023610 }, [2]u64{ 9764256642163156992, 1972152263052529513 },
[2]u64{ 17631875447420442880, 1232595164407830945 }, [2]u64{ 8204786253993389888, 1540743955509788682 },
[2]u64{ 1032610780636961552, 1925929944387235853 }, [2]u64{ 2951224747111794922, 1203706215242022408 },
[2]u64{ 3689030933889743652, 1504632769052528010 }, [2]u64{ 13834660704216955373, 1880790961315660012 },
[2]u64{ 17870034976990372916, 1175494350822287507 }, [2]u64{ 17725857702810578241, 1469367938527859384 },
[2]u64{ 3710578054803671186, 1836709923159824231 }, [2]u64{ 26536550077201078, 2295887403949780289 },
[2]u64{ 11545800389866720434, 1434929627468612680 }, [2]u64{ 14432250487333400542, 1793662034335765850 },
[2]u64{ 8816941072311974870, 2242077542919707313 }, [2]u64{ 17039803216263454053, 1401298464324817070 },
[2]u64{ 12076381983474541759, 1751623080406021338 }, [2]u64{ 5872105442488401391, 2189528850507526673 },
[2]u64{ 15199280947623720629, 1368455531567204170 }, [2]u64{ 9775729147674874978, 1710569414459005213 },
[2]u64{ 16831347453020981627, 2138211768073756516 }, [2]u64{ 1296220121283337709, 1336382355046097823 },
[2]u64{ 15455333206886335848, 1670477943807622278 }, [2]u64{ 10095794471753144002, 2088097429759527848 },
[2]u64{ 6309871544845715001, 1305060893599704905 }, [2]u64{ 12499025449484531656, 1631326116999631131 },
[2]u64{ 11012095793428276666, 2039157646249538914 }, [2]u64{ 11494245889320060820, 1274473528905961821 },
[2]u64{ 532749306367912313, 1593091911132452277 }, [2]u64{ 5277622651387278295, 1991364888915565346 },
[2]u64{ 7910200175544436838, 1244603055572228341 }, [2]u64{ 14499436237857933952, 1555753819465285426 },
[2]u64{ 8900923260467641632, 1944692274331606783 }, [2]u64{ 12480606065433357876, 1215432671457254239 },
[2]u64{ 10989071563364309441, 1519290839321567799 }, [2]u64{ 9124653435777998898, 1899113549151959749 },
[2]u64{ 8008751406574943263, 1186945968219974843 }, [2]u64{ 5399253239791291175, 1483682460274968554 },
[2]u64{ 15972438586593889776, 1854603075343710692 }, [2]u64{ 759402079766405302, 1159126922089819183 },
[2]u64{ 14784310654990170340, 1448908652612273978 }, [2]u64{ 9257016281882937117, 1811135815765342473 },
[2]u64{ 16182956370781059300, 2263919769706678091 }, [2]u64{ 7808504722524468110, 1414949856066673807 },
[2]u64{ 5148944884728197234, 1768687320083342259 }, [2]u64{ 1824495087482858639, 2210859150104177824 },
[2]u64{ 1140309429676786649, 1381786968815111140 }, [2]u64{ 1425386787095983311, 1727233711018888925 },
[2]u64{ 6393419502297367043, 2159042138773611156 }, [2]u64{ 13219259225790630210, 1349401336733506972 },
[2]u64{ 16524074032238287762, 1686751670916883715 }, [2]u64{ 16043406521870471799, 2108439588646104644 },
[2]u64{ 803757039314269066, 1317774742903815403 }, [2]u64{ 14839754354425000045, 1647218428629769253 },
[2]u64{ 4714634887749086344, 2059023035787211567 }, [2]u64{ 9864175832484260821, 1286889397367007229 },
[2]u64{ 16941905809032713930, 1608611746708759036 }, [2]u64{ 2730638187581340797, 2010764683385948796 },
[2]u64{ 10930020904093113806, 1256727927116217997 }, [2]u64{ 18274212148543780162, 1570909908895272496 },
[2]u64{ 4396021111970173586, 1963637386119090621 }, [2]u64{ 5053356204195052443, 1227273366324431638 },
[2]u64{ 15540067292098591362, 1534091707905539547 }, [2]u64{ 14813398096695851299, 1917614634881924434 },
[2]u64{ 13870059828862294966, 1198509146801202771 }, [2]u64{ 12725888767650480803, 1498136433501503464 },
[2]u64{ 15907360959563101004, 1872670541876879330 }, [2]u64{ 14553786618154326031, 1170419088673049581 },
[2]u64{ 4357175217410743827, 1463023860841311977 }, [2]u64{ 10058155040190817688, 1828779826051639971 },
[2]u64{ 7961007781811134206, 2285974782564549964 }, [2]u64{ 14199001900486734687, 1428734239102843727 },
[2]u64{ 13137066357181030455, 1785917798878554659 }, [2]u64{ 11809646928048900164, 2232397248598193324 },
[2]u64{ 16604401366885338411, 1395248280373870827 }, [2]u64{ 16143815690179285109, 1744060350467338534 },
[2]u64{ 10956397575869330579, 2180075438084173168 }, [2]u64{ 6847748484918331612, 1362547148802608230 },
[2]u64{ 17783057643002690323, 1703183936003260287 }, [2]u64{ 17617136035325974999, 2128979920004075359 },
[2]u64{ 17928239049719816230, 1330612450002547099 }, [2]u64{ 17798612793722382384, 1663265562503183874 },
[2]u64{ 13024893955298202172, 2079081953128979843 }, [2]u64{ 5834715712847682405, 1299426220705612402 },
[2]u64{ 16516766677914378815, 1624282775882015502 }, [2]u64{ 11422586310538197711, 2030353469852519378 },
[2]u64{ 11750802462513761473, 1268970918657824611 }, [2]u64{ 10076817059714813937, 1586213648322280764 },
[2]u64{ 12596021324643517422, 1982767060402850955 }, [2]u64{ 5566670318688504437, 1239229412751781847 },
[2]u64{ 2346651879933242642, 1549036765939727309 }, [2]u64{ 7545000868343941206, 1936295957424659136 },
[2]u64{ 4715625542714963254, 1210184973390411960 }, [2]u64{ 5894531928393704067, 1512731216738014950 },
[2]u64{ 16591536947346905892, 1890914020922518687 }, [2]u64{ 17287239619732898039, 1181821263076574179 },
[2]u64{ 16997363506238734644, 1477276578845717724 }, [2]u64{ 2799960309088866689, 1846595723557147156 },
[2]u64{ 10973347230035317489, 1154122327223216972 }, [2]u64{ 13716684037544146861, 1442652909029021215 },
[2]u64{ 12534169028502795672, 1803316136286276519 }, [2]u64{ 11056025267201106687, 2254145170357845649 },
[2]u64{ 18439230838069161439, 1408840731473653530 }, [2]u64{ 13825666510731675991, 1761050914342066913 },
[2]u64{ 3447025083132431277, 2201313642927583642 }, [2]u64{ 6766076695385157452, 1375821026829739776 },
[2]u64{ 8457595869231446815, 1719776283537174720 }, [2]u64{ 10571994836539308519, 2149720354421468400 },
[2]u64{ 6607496772837067824, 1343575221513417750 }, [2]u64{ 17482743002901110588, 1679469026891772187 },
[2]u64{ 17241742735199000331, 2099336283614715234 }, [2]u64{ 15387775227926763111, 1312085177259197021 },
[2]u64{ 5399660979626290177, 1640106471573996277 }, [2]u64{ 11361262242960250625, 2050133089467495346 },
[2]u64{ 11712474920277544544, 1281333180917184591 }, [2]u64{ 10028907631919542777, 1601666476146480739 },
[2]u64{ 7924448521472040567, 2002083095183100924 }, [2]u64{ 14176152362774801162, 1251301934489438077 },
[2]u64{ 3885132398186337741, 1564127418111797597 }, [2]u64{ 9468101516160310080, 1955159272639746996 },
[2]u64{ 15140935484454969608, 1221974545399841872 }, [2]u64{ 479425281859160394, 1527468181749802341 },
[2]u64{ 5210967620751338397, 1909335227187252926 }, [2]u64{ 17091912818251750210, 1193334516992033078 },
[2]u64{ 12141518985959911954, 1491668146240041348 }, [2]u64{ 15176898732449889943, 1864585182800051685 },
[2]u64{ 11791404716994875166, 1165365739250032303 }, [2]u64{ 10127569877816206054, 1456707174062540379 },
[2]u64{ 8047776328842869663, 1820883967578175474 }, [2]u64{ 836348374198811271, 2276104959472719343 },
[2]u64{ 7440246761515338900, 1422565599670449589 }, [2]u64{ 13911994470321561530, 1778206999588061986 },
[2]u64{ 8166621051047176104, 2222758749485077483 }, [2]u64{ 2798295147690791113, 1389224218428173427 },
[2]u64{ 17332926989895652603, 1736530273035216783 }, [2]u64{ 17054472718942177850, 2170662841294020979 },
[2]u64{ 8353202440125167204, 1356664275808763112 }, [2]u64{ 10441503050156459005, 1695830344760953890 },
[2]u64{ 3828506775840797949, 2119787930951192363 }, [2]u64{ 86973725686804766, 1324867456844495227 },
[2]u64{ 13943775212390669669, 1656084321055619033 }, [2]u64{ 3594660960206173375, 2070105401319523792 },
[2]u64{ 2246663100128858359, 1293815875824702370 }, [2]u64{ 12031700912015848757, 1617269844780877962 },
[2]u64{ 5816254103165035138, 2021587305976097453 }, [2]u64{ 5941001823691840913, 1263492066235060908 },
[2]u64{ 7426252279614801142, 1579365082793826135 }, [2]u64{ 4671129331091113523, 1974206353492282669 },
[2]u64{ 5225298841145639904, 1233878970932676668 }, [2]u64{ 6531623551432049880, 1542348713665845835 },
[2]u64{ 3552843420862674446, 1927935892082307294 }, [2]u64{ 16055585193321335241, 1204959932551442058 },
[2]u64{ 10846109454796893243, 1506199915689302573 }, [2]u64{ 18169322836923504458, 1882749894611628216 },
[2]u64{ 11355826773077190286, 1176718684132267635 }, [2]u64{ 9583097447919099954, 1470898355165334544 },
[2]u64{ 11978871809898874942, 1838622943956668180 }, [2]u64{ 14973589762373593678, 2298278679945835225 },
[2]u64{ 2440964573842414192, 1436424174966147016 }, [2]u64{ 3051205717303017741, 1795530218707683770 },
[2]u64{ 13037379183483547984, 2244412773384604712 }, [2]u64{ 8148361989677217490, 1402757983365377945 },
[2]u64{ 14797138505523909766, 1753447479206722431 }, [2]u64{ 13884737113477499304, 2191809349008403039 },
[2]u64{ 15595489723564518921, 1369880843130251899 }, [2]u64{ 14882676136028260747, 1712351053912814874 },
[2]u64{ 9379973133180550126, 2140438817391018593 }, [2]u64{ 17391698254306313589, 1337774260869386620 },
[2]u64{ 3292878744173340370, 1672217826086733276 }, [2]u64{ 4116098430216675462, 2090272282608416595 },
[2]u64{ 266718509671728212, 1306420176630260372 }, [2]u64{ 333398137089660265, 1633025220787825465 },
[2]u64{ 5028433689789463235, 2041281525984781831 }, [2]u64{ 10060300083759496378, 1275800953740488644 },
[2]u64{ 12575375104699370472, 1594751192175610805 }, [2]u64{ 1884160825592049379, 1993438990219513507 },
[2]u64{ 17318501580490888525, 1245899368887195941 }, [2]u64{ 7813068920331446945, 1557374211108994927 },
[2]u64{ 5154650131986920777, 1946717763886243659 }, [2]u64{ 915813323278131534, 1216698602428902287 },
[2]u64{ 14979824709379828129, 1520873253036127858 }, [2]u64{ 9501408849870009354, 1901091566295159823 },
[2]u64{ 12855909558809837702, 1188182228934474889 }, [2]u64{ 2234828893230133415, 1485227786168093612 },
[2]u64{ 2793536116537666769, 1856534732710117015 }, [2]u64{ 8663489100477123587, 1160334207943823134 },
[2]u64{ 1605989338741628675, 1450417759929778918 }, [2]u64{ 11230858710281811652, 1813022199912223647 },
[2]u64{ 9426887369424876662, 2266277749890279559 }, [2]u64{ 12809333633531629769, 1416423593681424724 },
[2]u64{ 16011667041914537212, 1770529492101780905 }, [2]u64{ 6179525747111007803, 2213161865127226132 },
[2]u64{ 13085575628799155685, 1383226165704516332 }, [2]u64{ 16356969535998944606, 1729032707130645415 },
[2]u64{ 15834525901571292854, 2161290883913306769 }, [2]u64{ 2979049660840976177, 1350806802445816731 },
[2]u64{ 17558870131333383934, 1688508503057270913 }, [2]u64{ 8113529608884566205, 2110635628821588642 },
[2]u64{ 9682642023980241782, 1319147268013492901 }, [2]u64{ 16714988548402690132, 1648934085016866126 },
[2]u64{ 11670363648648586857, 2061167606271082658 }, [2]u64{ 11905663298832754689, 1288229753919426661 },
[2]u64{ 1047021068258779650, 1610287192399283327 }, [2]u64{ 15143834390605638274, 2012858990499104158 },
[2]u64{ 4853210475701136017, 1258036869061940099 }, [2]u64{ 1454827076199032118, 1572546086327425124 },
[2]u64{ 1818533845248790147, 1965682607909281405 }, [2]u64{ 3442426662494187794, 1228551629943300878 },
[2]u64{ 13526405364972510550, 1535689537429126097 }, [2]u64{ 3072948650933474476, 1919611921786407622 },
[2]u64{ 15755650962115585259, 1199757451116504763 }, [2]u64{ 15082877684217093670, 1499696813895630954 },
[2]u64{ 9630225068416591280, 1874621017369538693 }, [2]u64{ 8324733676974063502, 1171638135855961683 },
[2]u64{ 5794231077790191473, 1464547669819952104 }, [2]u64{ 7242788847237739342, 1830684587274940130 },
[2]u64{ 18276858095901949986, 2288355734093675162 }, [2]u64{ 16034722328366106645, 1430222333808546976 },
[2]u64{ 1596658836748081690, 1787777917260683721 }, [2]u64{ 6607509564362490017, 2234722396575854651 },
[2]u64{ 1823850468512862308, 1396701497859909157 }, [2]u64{ 6891499104068465790, 1745876872324886446 },
[2]u64{ 17837745916940358045, 2182346090406108057 }, [2]u64{ 4231062170446641922, 1363966306503817536 },
[2]u64{ 5288827713058302403, 1704957883129771920 }, [2]u64{ 6611034641322878003, 2131197353912214900 },
[2]u64{ 13355268687681574560, 1331998346195134312 }, [2]u64{ 16694085859601968200, 1664997932743917890 },
[2]u64{ 11644235287647684442, 2081247415929897363 }, [2]u64{ 4971804045566108824, 1300779634956185852 },
[2]u64{ 6214755056957636030, 1625974543695232315 }, [2]u64{ 3156757802769657134, 2032468179619040394 },
[2]u64{ 6584659645158423613, 1270292612261900246 }, [2]u64{ 17454196593302805324, 1587865765327375307 },
[2]u64{ 17206059723201118751, 1984832206659219134 }, [2]u64{ 6142101308573311315, 1240520129162011959 },
[2]u64{ 3065940617289251240, 1550650161452514949 }, [2]u64{ 8444111790038951954, 1938312701815643686 },
[2]u64{ 665883850346957067, 1211445438634777304 }, [2]u64{ 832354812933696334, 1514306798293471630 },
[2]u64{ 10263815553021896226, 1892883497866839537 }, [2]u64{ 17944099766707154901, 1183052186166774710 },
[2]u64{ 13206752671529167818, 1478815232708468388 }, [2]u64{ 16508440839411459773, 1848519040885585485 },
[2]u64{ 12623618533845856310, 1155324400553490928 }, [2]u64{ 15779523167307320387, 1444155500691863660 },
[2]u64{ 1277659885424598868, 1805194375864829576 }, [2]u64{ 1597074856780748586, 2256492969831036970 },
[2]u64{ 5609857803915355770, 1410308106144398106 }, [2]u64{ 16235694291748970521, 1762885132680497632 },
[2]u64{ 1847873790976661535, 2203606415850622041 }, [2]u64{ 12684136165428883219, 1377254009906638775 },
[2]u64{ 11243484188358716120, 1721567512383298469 }, [2]u64{ 219297180166231438, 2151959390479123087 },
[2]u64{ 7054589765244976505, 1344974619049451929 }, [2]u64{ 13429923224983608535, 1681218273811814911 },
[2]u64{ 12175718012802122765, 2101522842264768639 }, [2]u64{ 14527352785642408584, 1313451776415480399 },
[2]u64{ 13547504963625622826, 1641814720519350499 }, [2]u64{ 12322695186104640628, 2052268400649188124 },
[2]u64{ 16925056528170176201, 1282667750405742577 }, [2]u64{ 7321262604930556539, 1603334688007178222 },
[2]u64{ 18374950293017971482, 2004168360008972777 }, [2]u64{ 4566814905495150320, 1252605225005607986 },
[2]u64{ 14931890668723713708, 1565756531257009982 }, [2]u64{ 9441491299049866327, 1957195664071262478 },
[2]u64{ 1289246043478778550, 1223247290044539049 }, [2]u64{ 6223243572775861092, 1529059112555673811 },
[2]u64{ 3167368447542438461, 1911323890694592264 }, [2]u64{ 1979605279714024038, 1194577431684120165 },
[2]u64{ 7086192618069917952, 1493221789605150206 }, [2]u64{ 18081112809442173248, 1866527237006437757 },
[2]u64{ 13606538515115052232, 1166579523129023598 }, [2]u64{ 7784801107039039482, 1458224403911279498 },
[2]u64{ 507629346944023544, 1822780504889099373 }, [2]u64{ 5246222702107417334, 2278475631111374216 },
[2]u64{ 3278889188817135834, 1424047269444608885 }, [2]u64{ 8710297504448807696, 1780059086805761106 }
};
// zig fmt: off
|
0 | repos/zig-ryu/src | repos/zig-ryu/src/ryu64/test_fixed.zig | const std = @import("std");
const ryu64 = @import("../ryu.zig").ryu64;
fn ieeeFromParts(sign: bool, exponent: u32, mantissa: u64) f64 {
std.debug.assert(exponent <= 2047);
std.debug.assert(mantissa <= (@as(u64, 1) << 53) - 1);
return @bitCast(f64, ((@as(u64, @boolToInt(sign)) << 63) | (@as(u64, exponent) << 52) | mantissa));
}
fn expectFixed(v: f64, precision: u32, expected: []const u8) void {
var buffer: [ryu64.max_buf_size.fixed]u8 = undefined;
const s = ryu64.printFixed(&buffer, v, precision);
std.testing.expectEqualSlices(u8, expected, s);
}
test "fixed basic" {
expectFixed(
ieeeFromParts(false, 1234, 99999),
0,
"3291009114715486435425664845573426149758869524108446525879746560",
);
}
test "fixed zero" {
expectFixed(0.0, 4, "0.0000");
expectFixed(0.0, 3, "0.000");
expectFixed(0.0, 2, "0.00");
expectFixed(0.0, 1, "0.0");
expectFixed(0.0, 0, "0");
}
test "fixed min/max" {
expectFixed(
ieeeFromParts(false, 0, 1),
1074,
"0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" ++
"000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" ++
"000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" ++
"000000000000000000000000000000000000000000000000000000049406564584124654417656879286822137" ++
"236505980261432476442558568250067550727020875186529983636163599237979656469544571773092665" ++
"671035593979639877479601078187812630071319031140452784581716784898210368871863605699873072" ++
"305000638740915356498438731247339727316961514003171538539807412623856559117102665855668676" ++
"818703956031062493194527159149245532930545654440112748012970999954193198940908041656332452" ++
"475714786901472678015935523861155013480352649347201937902681071074917033322268447533357208" ++
"324319360923828934583680601060115061698097530783422773183292479049825247307763759272478746" ++
"560847782037344696995336470179726777175851256605511991315048911014510378627381672509558373" ++
"89733598993664809941164205702637090279242767544565229087538682506419718265533447265625",
);
expectFixed(
ieeeFromParts(false, 2046, 0xfffffffffffff),
0,
"179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558" ++
"632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245" ++
"490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168" ++
"738177180919299881250404026184124858368",
);
}
test "fixed round to even" {
expectFixed(0.125, 3, "0.125");
expectFixed(0.125, 2, "0.12");
expectFixed(0.375, 3, "0.375");
expectFixed(0.375, 2, "0.38");
}
test "fixed round to even integer" {
expectFixed(2.5, 1, "2.5");
expectFixed(2.5, 0, "2");
expectFixed(3.5, 1, "3.5");
expectFixed(3.5, 0, "4");
}
test "fixed non round to even" {
expectFixed(0.748046875, 3, "0.748");
expectFixed(0.748046875, 2, "0.75");
expectFixed(0.748046875, 1, "0.7"); // 0.75 would round to "0.8", but this is smaller
expectFixed(0.2509765625, 3, "0.251");
expectFixed(0.2509765625, 2, "0.25");
expectFixed(0.2509765625, 1, "0.3"); // 0.25 would round to "0.2", but this is larger
expectFixed(ieeeFromParts(false, 1021, 1), 54, "0.250000000000000055511151231257827021181583404541015625");
expectFixed(ieeeFromParts(false, 1021, 1), 3, "0.250");
expectFixed(ieeeFromParts(false, 1021, 1), 2, "0.25");
expectFixed(ieeeFromParts(false, 1021, 1), 1, "0.3"); // 0.25 would round to "0.2", but this is larger (again)
}
test "fixed varying precision" {
expectFixed(1729.142857142857, 47, "1729.14285714285711037518922239542007446289062500000");
expectFixed(1729.142857142857, 46, "1729.1428571428571103751892223954200744628906250000");
expectFixed(1729.142857142857, 45, "1729.142857142857110375189222395420074462890625000");
expectFixed(1729.142857142857, 44, "1729.14285714285711037518922239542007446289062500");
expectFixed(1729.142857142857, 43, "1729.1428571428571103751892223954200744628906250");
expectFixed(1729.142857142857, 42, "1729.142857142857110375189222395420074462890625");
expectFixed(1729.142857142857, 41, "1729.14285714285711037518922239542007446289062");
expectFixed(1729.142857142857, 40, "1729.1428571428571103751892223954200744628906");
expectFixed(1729.142857142857, 39, "1729.142857142857110375189222395420074462891");
expectFixed(1729.142857142857, 38, "1729.14285714285711037518922239542007446289");
expectFixed(1729.142857142857, 37, "1729.1428571428571103751892223954200744629");
expectFixed(1729.142857142857, 36, "1729.142857142857110375189222395420074463");
expectFixed(1729.142857142857, 35, "1729.14285714285711037518922239542007446");
expectFixed(1729.142857142857, 34, "1729.1428571428571103751892223954200745");
expectFixed(1729.142857142857, 33, "1729.142857142857110375189222395420074");
expectFixed(1729.142857142857, 32, "1729.14285714285711037518922239542007");
expectFixed(1729.142857142857, 31, "1729.1428571428571103751892223954201");
expectFixed(1729.142857142857, 30, "1729.142857142857110375189222395420");
expectFixed(1729.142857142857, 29, "1729.14285714285711037518922239542");
expectFixed(1729.142857142857, 28, "1729.1428571428571103751892223954");
expectFixed(1729.142857142857, 27, "1729.142857142857110375189222395");
expectFixed(1729.142857142857, 26, "1729.14285714285711037518922240");
expectFixed(1729.142857142857, 25, "1729.1428571428571103751892224");
expectFixed(1729.142857142857, 24, "1729.142857142857110375189222");
expectFixed(1729.142857142857, 23, "1729.14285714285711037518922");
expectFixed(1729.142857142857, 22, "1729.1428571428571103751892");
expectFixed(1729.142857142857, 21, "1729.142857142857110375189");
expectFixed(1729.142857142857, 20, "1729.14285714285711037519");
expectFixed(1729.142857142857, 19, "1729.1428571428571103752");
expectFixed(1729.142857142857, 18, "1729.142857142857110375");
expectFixed(1729.142857142857, 17, "1729.14285714285711038");
expectFixed(1729.142857142857, 16, "1729.1428571428571104");
expectFixed(1729.142857142857, 15, "1729.142857142857110");
expectFixed(1729.142857142857, 14, "1729.14285714285711");
expectFixed(1729.142857142857, 13, "1729.1428571428571");
expectFixed(1729.142857142857, 12, "1729.142857142857");
expectFixed(1729.142857142857, 11, "1729.14285714286");
expectFixed(1729.142857142857, 10, "1729.1428571429");
expectFixed(1729.142857142857, 9, "1729.142857143");
expectFixed(1729.142857142857, 8, "1729.14285714");
expectFixed(1729.142857142857, 7, "1729.1428571");
expectFixed(1729.142857142857, 6, "1729.142857");
expectFixed(1729.142857142857, 5, "1729.14286");
expectFixed(1729.142857142857, 4, "1729.1429");
expectFixed(1729.142857142857, 3, "1729.143");
expectFixed(1729.142857142857, 2, "1729.14");
expectFixed(1729.142857142857, 1, "1729.1");
expectFixed(1729.142857142857, 0, "1729");
}
test "fixed carrying" {
expectFixed(0.0009, 4, "0.0009");
expectFixed(0.0009, 3, "0.001");
expectFixed(0.0029, 4, "0.0029");
expectFixed(0.0029, 3, "0.003");
expectFixed(0.0099, 4, "0.0099");
expectFixed(0.0099, 3, "0.010");
expectFixed(0.0299, 4, "0.0299");
expectFixed(0.0299, 3, "0.030");
expectFixed(0.0999, 4, "0.0999");
expectFixed(0.0999, 3, "0.100");
expectFixed(0.2999, 4, "0.2999");
expectFixed(0.2999, 3, "0.300");
expectFixed(0.9999, 4, "0.9999");
expectFixed(0.9999, 3, "1.000");
expectFixed(2.9999, 4, "2.9999");
expectFixed(2.9999, 3, "3.000");
expectFixed(9.9999, 4, "9.9999");
expectFixed(9.9999, 3, "10.000");
expectFixed(29.9999, 4, "29.9999");
expectFixed(29.9999, 3, "30.000");
expectFixed(99.9999, 4, "99.9999");
expectFixed(99.9999, 3, "100.000");
expectFixed(299.9999, 4, "299.9999");
expectFixed(299.9999, 3, "300.000");
expectFixed(0.09, 2, "0.09");
expectFixed(0.09, 1, "0.1");
expectFixed(0.29, 2, "0.29");
expectFixed(0.29, 1, "0.3");
expectFixed(0.99, 2, "0.99");
expectFixed(0.99, 1, "1.0");
expectFixed(2.99, 2, "2.99");
expectFixed(2.99, 1, "3.0");
expectFixed(9.99, 2, "9.99");
expectFixed(9.99, 1, "10.0");
expectFixed(29.99, 2, "29.99");
expectFixed(29.99, 1, "30.0");
expectFixed(99.99, 2, "99.99");
expectFixed(99.99, 1, "100.0");
expectFixed(299.99, 2, "299.99");
expectFixed(299.99, 1, "300.0");
expectFixed(0.9, 1, "0.9");
expectFixed(0.9, 0, "1");
expectFixed(2.9, 1, "2.9");
expectFixed(2.9, 0, "3");
expectFixed(9.9, 1, "9.9");
expectFixed(9.9, 0, "10");
expectFixed(29.9, 1, "29.9");
expectFixed(29.9, 0, "30");
expectFixed(99.9, 1, "99.9");
expectFixed(99.9, 0, "100");
expectFixed(299.9, 1, "299.9");
expectFixed(299.9, 0, "300");
}
test "fixed rounding result zero" {
expectFixed(0.004, 3, "0.004");
expectFixed(0.004, 2, "0.00");
expectFixed(0.4, 1, "0.4");
expectFixed(0.4, 0, "0");
expectFixed(0.5, 1, "0.5");
expectFixed(0.5, 0, "0");
}
test "fixed regression #1" {
expectFixed(7.018232e-82, 6, "0.000000");
}
|
0 | repos/zig-ryu/src | repos/zig-ryu/src/ryu32/test_shortest.zig | const std = @import("std");
const ryu32 = @import("../ryu.zig").ryu32;
fn testShortest(expected: []const u8, input: f32) void {
var buffer: [ryu32.max_buf_size.shortest]u8 = undefined;
const converted = ryu32.printShortest(buffer[0..], input);
std.debug.assert(std.mem.eql(u8, expected, converted));
}
test "basic" {
testShortest("0E0", 0.0);
testShortest("-0E0", -@as(f32, 0.0));
testShortest("1E0", 1.0);
testShortest("-1E0", -1.0);
testShortest("NaN", std.math.nan(f32));
testShortest("Infinity", std.math.inf(f32));
testShortest("-Infinity", -std.math.inf(f32));
}
test "switch to subnormal" {
testShortest("1.1754944E-38", 1.1754944e-38);
}
test "min and max" {
testShortest("3.4028235E38", @bitCast(f32, @as(u32, 0x7f7fffff)));
testShortest("1E-45", @bitCast(f32, @as(u32, 1)));
}
// Check that we return the exact boundary if it is the shortest
// representation, but only if the original floating point number is even.
test "boundary round even" {
testShortest("3.355445E7", 3.355445e7);
testShortest("9E9", 8.999999e9);
testShortest("3.436672E10", 3.4366717e10);
}
// If the exact value is exactly halfway between two shortest representations,
// then we round to even. It seems like this only makes a difference if the
// last two digits are ...2|5 or ...7|5, and we cut off the 5.
test "exact value round even" {
testShortest("3.0540412E5", 3.0540412E5);
testShortest("8.0990312E3", 8.0990312E3);
}
test "lots of trailing zeros" {
// Pattern for the first test: 00111001100000000000000000000000
testShortest("2.4414062E-4", 2.4414062E-4);
testShortest("2.4414062E-3", 2.4414062E-3);
testShortest("4.3945312E-3", 4.3945312E-3);
testShortest("6.3476562E-3", 6.3476562E-3);
}
test "looks like pow5" {
// These numbers have a mantissa that is the largest power of 5 that fits,
// and an exponent that causes the computation for q to result in 10, which is a corner
// case for Ryu.
testShortest("6.7108864E17", @bitCast(f32, @as(u32, 0x5D1502F9)));
testShortest("1.3421773E18", @bitCast(f32, @as(u32, 0x5D9502F9)));
testShortest("2.6843546E18", @bitCast(f32, @as(u32, 0x5E1502F9)));
}
test "regression" {
testShortest("4.7223665E21", 4.7223665E21);
testShortest("8.388608E6", 8388608.0);
testShortest("1.6777216E7", 1.6777216E7);
testShortest("3.3554436E7", 3.3554436E7);
testShortest("6.7131496E7", 6.7131496E7);
testShortest("1.9310392E-38", 1.9310392E-38);
testShortest("-2.47E-43", -2.47E-43);
testShortest("1.993244E-38", 1.993244E-38);
testShortest("4.1039004E3", 4103.9003);
testShortest("5.3399997E9", 5.3399997E9);
testShortest("6.0898E-39", 6.0898E-39);
testShortest("1.0310042E-3", 0.0010310042);
testShortest("2.882326E17", 2.8823261E17);
testShortest("7.038531E-26", 7.0385309E-26);
testShortest("9.223404E17", 9.2234038E17);
testShortest("6.710887E7", 6.7108872E7);
testShortest("1E-44", 1.0E-44);
testShortest("2.816025E14", 2.816025E14);
testShortest("9.223372E18", 9.223372E18);
testShortest("1.5846086E29", 1.5846085E29);
testShortest("1.1811161E19", 1.1811161E19);
testShortest("5.368709E18", 5.368709E18);
testShortest("4.6143166E18", 4.6143165E18);
testShortest("7.812537E-3", 0.007812537);
testShortest("1E-45", 1.4E-45);
testShortest("1.18697725E20", 1.18697724E20);
testShortest("1.00014165E-36", 1.00014165E-36);
testShortest("2E2", 200.0);
testShortest("3.3554432E7", 3.3554432E7);
}
|
0 | repos/zig-ryu/src | repos/zig-ryu/src/ryu32/print_shortest.zig | // Copyright 2018 Ulf Adams
//
// The contents of this file may be used under the terms of the Apache License,
// Version 2.0.
//
// (See accompanying file LICENSE-Apache or copy at
// http://www.apache.org/licenses/LICENSE-2.0)
//
// Alternatively, the contents of this file may be used under the terms of
// the Boost Software License, Version 1.0.
// (See accompanying file LICENSE-Boost or copy at
// https://www.boost.org/LICENSE_1_0.txt)
//
// Unless required by applicable law or agreed to in writing, this software
// is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied.
const std = @import("std");
usingnamespace @import("../internal.zig");
// This table is generated by PrintFloatLookupTable.
const FLOAT_POW5_INV_BITCOUNT = 59;
const FLOAT_POW5_INV_SPLIT = [_]u64{
576460752303423489, 461168601842738791, 368934881474191033, 295147905179352826,
472236648286964522, 377789318629571618, 302231454903657294, 483570327845851670,
386856262276681336, 309485009821345069, 495176015714152110, 396140812571321688,
316912650057057351, 507060240091291761, 405648192073033409, 324518553658426727,
519229685853482763, 415383748682786211, 332306998946228969, 531691198313966350,
425352958651173080, 340282366920938464, 544451787073501542, 435561429658801234,
348449143727040987, 557518629963265579, 446014903970612463, 356811923176489971,
570899077082383953, 456719261665907162, 365375409332725730,
};
const FLOAT_POW5_BITCOUNT = 61;
const FLOAT_POW5_SPLIT = [_]u64{
1152921504606846976, 1441151880758558720, 1801439850948198400, 2251799813685248000,
1407374883553280000, 1759218604441600000, 2199023255552000000, 1374389534720000000,
1717986918400000000, 2147483648000000000, 1342177280000000000, 1677721600000000000,
2097152000000000000, 1310720000000000000, 1638400000000000000, 2048000000000000000,
1280000000000000000, 1600000000000000000, 2000000000000000000, 1250000000000000000,
1562500000000000000, 1953125000000000000, 1220703125000000000, 1525878906250000000,
1907348632812500000, 1192092895507812500, 1490116119384765625, 1862645149230957031,
1164153218269348144, 1455191522836685180, 1818989403545856475, 2273736754432320594,
1421085471520200371, 1776356839400250464, 2220446049250313080, 1387778780781445675,
1734723475976807094, 2168404344971008868, 1355252715606880542, 1694065894508600678,
2117582368135750847, 1323488980084844279, 1654361225106055349, 2067951531382569187,
1292469707114105741, 1615587133892632177, 2019483917365790221,
};
fn mulShift(m: u32, factor: u64, shift: i32) u32 {
std.debug.assert(shift > 32);
const factor_lo = @truncate(u32, factor);
const factor_hi = @intCast(u32, factor >> 32);
const bits0 = @as(u64, m) * factor_lo;
const bits1 = @as(u64, m) * factor_hi;
const sum = (bits0 >> 32) + bits1;
const shifted_sum = sum >> @intCast(u6, shift - 32);
return @intCast(u32, shifted_sum);
}
fn mulPow5InvDivPow2(m: u32, q: u32, j: i32) u32 {
return mulShift(m, FLOAT_POW5_INV_SPLIT[q], j);
}
fn mulPow5DivPow2(m: u32, i: u32, j: i32) u32 {
return mulShift(m, FLOAT_POW5_SPLIT[i], j);
}
const Decimal32 = struct {
sign: bool,
mantissa: u32,
exponent: i32,
};
pub fn printShortest16(result: []u8, f: f16) []u8 {
std.debug.assert(result.len >= 11);
const mantissa_bits = std.math.floatMantissaBits(f16);
const exponent_bits = std.math.floatExponentBits(f16);
const bits = @bitCast(u16, f);
const v = floatToDecimal(bits, mantissa_bits, exponent_bits, false);
const index = decimalToBuffer(v, result);
return result[0..index];
}
pub fn printShortest32(result: []u8, f: f32) []u8 {
std.debug.assert(result.len >= 16);
const mantissa_bits = std.math.floatMantissaBits(f32);
const exponent_bits = std.math.floatExponentBits(f32);
const bits = @bitCast(u32, f);
const v = floatToDecimal(bits, mantissa_bits, exponent_bits, false);
const index = decimalToBuffer(v, result);
return result[0..index];
}
pub fn copySpecialString(result: []u8, d: Decimal32) usize {
if (d.mantissa != 0) {
std.mem.copy(u8, result, "NaN");
return 3;
}
if (d.sign) {
result[0] = '-';
}
const offset: usize = @boolToInt(d.sign);
std.mem.copy(u8, result[offset..], "Infinity");
return offset + 8;
}
fn floatToDecimal(bits: u32, mantissa_bits: u5, exponent_bits: u5, explicit_leading_bit: bool) Decimal32 {
const exponent_bias = (@as(u32, 1) << (exponent_bits - 1)) - 1;
const sign = ((bits >> (mantissa_bits + exponent_bits)) & 1) != 0;
const mantissa = bits & ((@as(u32, 1) << mantissa_bits) - 1);
const exponent = (bits >> mantissa_bits) & ((@as(u32, 1) << exponent_bits) - 1);
// Filter out special case nan and inf
if (exponent == 0 and mantissa == 0) {
return Decimal32{
.sign = sign,
.mantissa = 0,
.exponent = 0,
};
}
if (exponent == ((@as(u32, 1) << exponent_bits) - 1)) {
return Decimal32{
.sign = sign,
.mantissa = if (explicit_leading_bit) mantissa & ((@as(u32, 1) << (mantissa_bits - 1)) - 1) else mantissa,
.exponent = 0x7fffffff,
};
}
var e2: i32 = undefined;
var m2: u32 = undefined;
// We subtract 2 so that the bounds computation has 2 additional bits.
if (explicit_leading_bit) {
// mantissa includes the explicit leading bit, so we need to correct for that here
if (exponent == 0) {
e2 = 1 - @intCast(i32, exponent_bias) - @intCast(i32, mantissa_bits) + 1 - 2;
} else {
e2 = @intCast(i32, exponent) - @intCast(i32, exponent_bias) - @intCast(i32, mantissa_bits) + 1 - 2;
}
m2 = mantissa;
} else {
if (exponent == 0) {
e2 = 1 - @intCast(i32, exponent_bias) - @intCast(i32, mantissa_bits) - 2;
m2 = mantissa;
} else {
e2 = @intCast(i32, exponent) - @intCast(i32, exponent_bias) - @intCast(i32, mantissa_bits) - 2;
m2 = (@as(u32, 1) << mantissa_bits) | mantissa;
}
}
const even = m2 & 1 == 0;
const accept_bounds = even;
// Step 2: Determine the interval of legal decimal representations.
const mv = 4 * m2;
const mp = 4 * m2 + 2;
// Implicit bool -> int conversion. True is 1, false is 0.
const mm_shift = mantissa != 0 or exponent <= 1;
const mm = 4 * m2 - 1 - @boolToInt(mm_shift);
// Step 3: Convert to a decimal power base using 64-bit arithmetic.
var vr: u32 = undefined;
var vp: u32 = undefined;
var vm: u32 = undefined;
var e10: i32 = undefined;
var vm_is_trailing_zeros = false;
var vr_is_trailing_zeros = false;
var last_removed_digit: u8 = 0;
if (e2 >= 0) {
const q = @intCast(i32, log10Pow2(@intCast(u32, e2)));
e10 = q;
const k = FLOAT_POW5_INV_BITCOUNT + pow5Bits(@intCast(u32, q)) - 1;
const i = -e2 + @intCast(i32, q) + @intCast(i32, k);
vr = mulPow5InvDivPow2(mv, @intCast(u32, q), i);
vp = mulPow5InvDivPow2(mp, @intCast(u32, q), i);
vm = mulPow5InvDivPow2(mm, @intCast(u32, q), i);
if (q != 0 and ((vp - 1) / 10 <= vm / 10)) {
// We need to know one removed digit even if we are not going to loop below. We could use
// q = X - 1 above, except that would require 33 bits for the result, and we've found that
// 32-bit arithmetic is faster even on 64-bit machines.
const l = FLOAT_POW5_INV_BITCOUNT + pow5Bits(@intCast(u32, q - 1)) - 1;
last_removed_digit = @intCast(u8, (mulPow5InvDivPow2(mv, @intCast(u32, q - 1), -e2 + @intCast(i32, q) - 1 + @intCast(i32, l)) % 10));
}
if (q <= 9) {
// The largest power of 5 that fits in 24 bits is 5^10, but q<=9 seems to be safe as well.
// Only one of mp, mv, and mm can be a multiple of 5, if any.
if (mv % 5 == 0) {
vr_is_trailing_zeros = multipleOfPowerOf5(mv, @intCast(u32, q));
} else if (accept_bounds) {
vm_is_trailing_zeros = multipleOfPowerOf5(mm, @intCast(u32, q));
} else {
vp -= @boolToInt(multipleOfPowerOf5(mp, @intCast(u32, q)));
}
}
} else {
const q = @intCast(i32, log10Pow5(@intCast(u32, -e2)));
e10 = q + e2;
const i = -e2 - q;
const k = @intCast(i32, pow5Bits(@intCast(u32, i))) - FLOAT_POW5_BITCOUNT;
var j = q - @intCast(i32, k);
vr = mulPow5DivPow2(mv, @intCast(u32, i), j);
vp = mulPow5DivPow2(mp, @intCast(u32, i), j);
vm = mulPow5DivPow2(mm, @intCast(u32, i), j);
if (q != 0 and ((vp - 1) / 10 <= vm / 10)) {
j = @intCast(i32, q) - 1 - (@intCast(i32, pow5Bits(@intCast(u32, i + 1))) - @intCast(i32, FLOAT_POW5_BITCOUNT));
last_removed_digit = @intCast(u8, mulPow5DivPow2(mv, @intCast(u32, i + 1), j) % 10);
}
if (q <= 1) {
// {vr,vp,vm} is trailing zeros if {mv,mp,mm} has at least q trailing 0 bits.
// mv = 4 * m2, so it always has at least two trailing 0 bits.
vr_is_trailing_zeros = true;
if (accept_bounds) {
// mm = mv - 1 - mmShift, so it has 1 trailing 0 bit iff mmShift == 1.
vm_is_trailing_zeros = mm_shift;
} else {
// mp = mv + 2, so it always has at least one trailing 0 bit.
vp -= 1;
}
} else if (q < 31) { // TODO(ulfjack): Use a tighter bound here.
vr_is_trailing_zeros = (mv & ((@as(u32, 1) << @intCast(u5, (q - 1))) - 1)) == 0;
}
}
// Step 4: Find the shortest decimal representation in the interval of legal representations.
var removed: u32 = 0;
var output: u32 = undefined;
if (vm_is_trailing_zeros or vr_is_trailing_zeros) {
// General case, which happens rarely.
while (vp / 10 > vm / 10) {
vm_is_trailing_zeros = vm_is_trailing_zeros and vm % 10 == 0;
vr_is_trailing_zeros = vr_is_trailing_zeros and last_removed_digit == 0;
last_removed_digit = @intCast(u8, vr % 10);
vr /= 10;
vp /= 10;
vm /= 10;
removed += 1;
}
if (vm_is_trailing_zeros) {
while (vm % 10 == 0) {
vr_is_trailing_zeros = vr_is_trailing_zeros and last_removed_digit == 0;
last_removed_digit = @intCast(u8, vr % 10);
vr /= 10;
vp /= 10;
vm /= 10;
removed += 1;
}
}
if (vr_is_trailing_zeros and (last_removed_digit == 5) and (vr % 2 == 0)) {
// Round even if the exact number is .....50..0.
last_removed_digit = 4;
}
// We need to take vr+1 if vr is outside bounds or we need to round up.
output = vr +
@boolToInt((vr == vm and (!accept_bounds or !vm_is_trailing_zeros)) or (last_removed_digit >= 5));
} else {
// Common case.
while (vp / 10 > vm / 10) {
last_removed_digit = @intCast(u8, vr % 10);
vr /= 10;
vp /= 10;
vm /= 10;
removed += 1;
}
// We need to take vr+1 if vr is outside bounds or we need to round up.
output = vr + @boolToInt((vr == vm) or (last_removed_digit >= 5));
}
return Decimal32{
.sign = sign,
.mantissa = output,
.exponent = e10 + @intCast(i32, removed),
};
}
fn decimalToBuffer(v: Decimal32, result: []u8) usize {
if (v.exponent == 0x7fffffff) {
return copySpecialString(result, v);
}
// Step 5: Print the decimal representation.
var index: usize = 0;
if (v.sign) {
result[index] = '-';
index += 1;
}
var output = v.mantissa;
const olength = decimalLength9(output);
// Print the decimal digits. The following code is equivalent to:
//
// var i: usize = 0;
// while (i < olength - 1) : (i += 1) {
// const c = output % 10;
// output /= 10;
// result[index + olength - i] = @intCast(u8, '0' + c);
// }
// result[index] = @intCast(u8, '0' + output % 10);
var i: usize = 0;
while (output >= 10000) {
const c = output % 10000;
output /= 10000;
const c0 = (c % 100) << 1;
const c1 = (c / 100) << 1;
// TODO: See https://github.com/ziglang/zig/issues/1329
result[index + olength - i - 1 + 0] = DIGIT_TABLE[c0 + 0];
result[index + olength - i - 1 + 1] = DIGIT_TABLE[c0 + 1];
result[index + olength - i - 3 + 0] = DIGIT_TABLE[c1 + 0];
result[index + olength - i - 3 + 1] = DIGIT_TABLE[c1 + 1];
i += 4;
}
if (output >= 100) {
const c = (output % 100) << 1;
output /= 100;
result[index + olength - i - 1 + 0] = DIGIT_TABLE[c + 0];
result[index + olength - i - 1 + 1] = DIGIT_TABLE[c + 1];
i += 2;
}
if (output >= 10) {
const c = output << 1;
result[index + olength - i] = DIGIT_TABLE[c + 1];
result[index] = DIGIT_TABLE[c];
} else {
result[index] = @intCast(u8, '0' + output);
}
// Print decimal point if needed.
if (olength > 1) {
result[index + 1] = '.';
index += olength + 1;
} else {
index += 1;
}
// Print the exponent.
result[index] = 'E';
var exp = v.exponent + @intCast(i32, olength) - 1;
index += 1;
if (exp < 0) {
result[index] = '-';
index += 1;
exp = -exp;
}
var expu = @intCast(usize, exp);
if (exp >= 10) {
result[index + 0] = DIGIT_TABLE[2 * expu + 0];
result[index + 1] = DIGIT_TABLE[2 * expu + 1];
index += 2;
} else {
result[index] = @intCast(u8, '0' + expu);
index += 1;
}
return index;
}
|
0 | repos/zig-ryu/src | repos/zig-ryu/src/internal/intrinsics.zig | //! Low-level math intrinsics used during float printing. These may tuned with certain
//! constraints and mind and should not be considered general purpose.
const std = @import("std");
/// Return the length of a number in base-10.
///
/// Input must be less than 10 digits:
/// f2s: 9 digits are sufficient for round-tripping.
/// d2fixed: We print 9-digit blocks.
pub inline fn decimalLength9(x: u32) u32 {
std.debug.assert(x < 1000000000);
if (x >= 100000000) return 9;
if (x >= 10000000) return 8;
if (x >= 1000000) return 7;
if (x >= 100000) return 6;
if (x >= 10000) return 5;
if (x >= 1000) return 4;
if (x >= 100) return 3;
if (x >= 10) return 2;
return 1;
}
/// Return the length of a number in base-10.
///
/// Input must be less than 17 digits.
pub inline fn decimalLength17(x: u64) u32 {
// This is slightly faster than a loop.
// The average output length is 16.38 digits, so we check high-to-low.
// Function precondition: v is not an 18, 19, or 20-digit number.
// (17 digits are sufficient for round-tripping.)
std.debug.assert(x < 100000000000000000);
if (x >= 10000000000000000) return 17;
if (x >= 1000000000000000) return 16;
if (x >= 100000000000000) return 15;
if (x >= 10000000000000) return 14;
if (x >= 1000000000000) return 13;
if (x >= 100000000000) return 12;
if (x >= 10000000000) return 11;
if (x >= 1000000000) return 10;
if (x >= 100000000) return 9;
if (x >= 10000000) return 8;
if (x >= 1000000) return 7;
if (x >= 100000) return 6;
if (x >= 10000) return 5;
if (x >= 1000) return 4;
if (x >= 100) return 3;
if (x >= 10) return 2;
return 1;
}
/// Returns floor(log_10(2^x)) where 0 <= x <= 1650.
pub inline fn log10Pow2(x: u32) u32 {
std.debug.assert(x >= 0);
std.debug.assert(x <= 1650);
return (x *% 78913) >> 18;
}
/// Returns floor(log_10(5^x)) where 0 <= x <= 2620
pub inline fn log10Pow5(x: u32) u32 {
std.debug.assert(x >= 0);
std.debug.assert(x <= 2620);
return (x *% 732923) >> 20;
}
/// Returns log_2(5^x) where 0 <= x <= 3528.
pub inline fn log2pow5(x: u32) u32 {
std.debug.assert(x >= 0);
std.debug.assert(x <= 3528);
return (x *% 1217359) >> 19;
}
/// Returns ceil(log_2(5^e)) where 0 <= x <= 3528
pub inline fn pow5Bits(x: u32) u32 {
std.debug.assert(x >= 0);
std.debug.assert(x <= 3528);
return ((x *% 1217359) >> 19) + 1;
}
/// Returns ceil(log_2(5^x)) where 0 <= x <= 3528.
pub inline fn ceil_log2pow5(x: u32) u32 {
return log2pow5(x) + 1;
}
/// Returns true if 2^p | x for some integer p.
pub inline fn multipleOfPowerOf2(x: u64, p: u32) bool {
std.debug.assert(x != 0);
return x & (std.math.shl(u64, 1, p) -% 1) == 0;
}
/// Returns the number of factors of 5 in x.
pub inline fn pow5Factor(x: u64) u32 {
var y = x;
var c: u32 = 0;
while (true) : (c += 1) {
std.debug.assert(y != 0);
const q = y / 5;
const r = y - 5 * q;
if (r != 0) break;
y = q;
}
return c;
}
/// Returns true if 5^p | x for some integer p.
pub inline fn multipleOfPowerOf5(x: u64, p: u32) bool {
return pow5Factor(x) >= p;
}
/// Performs a 128x128 bit multiplication. The high bits of the 256-bit product are stored
/// in the input productHi. The low bits are returned directly from the function.
pub inline fn umul256(a: u128, bHi: u64, bLo: u64, productHi: *u128) u128 {
const aLo = @truncate(u64, a);
const aHi = @truncate(u64, a >> 64);
const b00 = @as(u128, aLo) *% bLo;
const b01 = @as(u128, aLo) *% bHi;
const b10 = @as(u128, aHi) *% bLo;
const b11 = @as(u128, aHi) *% bHi;
const b00Lo = @truncate(u64, b00);
const b00Hi = @truncate(u64, b00 >> 64);
const mid1 = b10 +% b00Hi;
const mid1Lo = @truncate(u64, mid1);
const mid1Hi = @truncate(u64, mid1 >> 64);
const mid2 = b01 +% mid1Lo;
const mid2Lo = @truncate(u64, mid2);
const mid2Hi = @truncate(u64, mid2 >> 64);
const pHi = b11 +% mid1Hi +% mid2Hi;
const pLo = (@as(u128, mid2Lo) << 64) | b00Lo;
productHi.* = pHi;
return pLo;
}
/// Returns the high 128-bits from a 128x128 bit multiplication.
pub inline fn umul256_hi(a: u128, bHi: u64, bLo: u64) u128 {
var hi: u128 = undefined;
_ = umul256(a, bHi, bLo, &hi);
return hi;
}
/// Returns x % 1000000000.
pub inline fn uint128_mod1e9(x: u128) u32 {
const multiplied = @truncate(u64, umul256_hi(x, 0x89705F4136B4A597, 0x31680A88F8953031));
const shifted = @truncate(u32, multiplied >> 29);
return @truncate(u32, x) -% 1000000000 *% shifted;
}
pub inline fn mulShift_mod1e9(m: u64, mul: [3]u64, j: u32) u32 {
const m1 = @as(u128, m);
const b0 = m1 *% mul[0];
const b1 = m1 *% mul[1];
const b2 = m1 *% mul[2];
std.debug.assert(j >= 128);
std.debug.assert(j <= 180);
const mid = b1 +% @intCast(u64, b0 >> 64);
const s1 = b2 +% @intCast(u64, mid >> 64);
return uint128_mod1e9(s1 >> @intCast(u7, j - 128));
}
pub inline fn mulShift64(m: u64, mul: [2]u64, j: u32) u64 {
const m1 = @as(u128, m);
const b0 = m1 *% mul[0];
const b2 = m1 *% mul[1];
return @truncate(u64, ((b0 >> 64) +% b2) >> @intCast(u7, j - 64));
}
const POW10_ADDITIONAL_BITS = 120;
pub inline fn indexForExponent(e: u32) u32 {
return (e + 15) / 16;
}
pub inline fn pow10BitsForIndex(idx: u32) u32 {
return 16 * idx + POW10_ADDITIONAL_BITS;
}
pub inline fn lengthForIndex(idx: u32) u32 {
// +1 for ceil, +16 for mantissa, +8 to round up when dividing by 9
return (log10Pow2(16 * idx) + 1 + 16 + 8) / 9;
}
|
0 | repos/zig-ryu/src | repos/zig-ryu/src/internal/tables_digits.zig | // Copyright 2018 Ulf Adams
//
// The contents of this file may be used under the terms of the Apache License,
// Version 2.0.
//
// (See accompanying file LICENSE-Apache or copy at
// http://www.apache.org/licenses/LICENSE-2.0)
//
// Alternatively, the contents of this file may be used under the terms of
// the Boost Software License, Version 1.0.
// (See accompanying file LICENSE-Boost or copy at
// https://www.boost.org/LICENSE_1_0.txt)
//
// Unless required by applicable law or agreed to in writing, this software
// is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied.
// zig fmt: off
/// A table of all two-digit numbers. This is used to speed up decimal digit
/// generation by copying pairs of digits into the final output.
pub const DIGIT_TABLE = [200]u8 {
'0','0','0','1','0','2','0','3','0','4','0','5','0','6','0','7','0','8','0','9',
'1','0','1','1','1','2','1','3','1','4','1','5','1','6','1','7','1','8','1','9',
'2','0','2','1','2','2','2','3','2','4','2','5','2','6','2','7','2','8','2','9',
'3','0','3','1','3','2','3','3','3','4','3','5','3','6','3','7','3','8','3','9',
'4','0','4','1','4','2','4','3','4','4','4','5','4','6','4','7','4','8','4','9',
'5','0','5','1','5','2','5','3','5','4','5','5','5','6','5','7','5','8','5','9',
'6','0','6','1','6','2','6','3','6','4','6','5','6','6','6','7','6','8','6','9',
'7','0','7','1','7','2','7','3','7','4','7','5','7','6','7','7','7','8','7','9',
'8','0','8','1','8','2','8','3','8','4','8','5','8','6','8','7','8','8','8','9',
'9','0','9','1','9','2','9','3','9','4','9','5','9','6','9','7','9','8','9','9'
};
// zig fmt: on
|
0 | repos/zig-ryu/src | repos/zig-ryu/src/internal/common.zig | const std = @import("std");
usingnamespace @import("tables_digits.zig");
pub const DOUBLE_MANTISSA_BITS = 52;
pub const DOUBLE_EXPONENT_BITS = 11;
pub const DOUBLE_BIAS = 1023;
pub fn copy_special_string(result: []u8, sign: bool, mantissa: u64) []u8 {
if (mantissa != 0) {
std.mem.copy(u8, result, "nan");
return result[0..3];
}
if (sign) {
result[0] = '-';
}
const offset: usize = @boolToInt(sign);
std.mem.copy(u8, result[offset..], "Infinity");
return result[0 .. offset + 8];
}
pub inline fn append_d_digits(result: []u8, olength: u32, digits_: u32) void {
var digits = digits_;
var i: usize = 0;
while (digits >= 10000) {
const c = digits % 10000;
digits /= 10000;
const c0 = (c % 100) << 1;
const c1 = (c / 100) << 1;
std.mem.copy(u8, result[olength + 1 - i - 2 ..], DIGIT_TABLE[c0 .. c0 + 2]);
std.mem.copy(u8, result[olength + 1 - i - 4 ..], DIGIT_TABLE[c1 .. c1 + 2]);
i += 4;
}
if (digits >= 100) {
const c = (digits % 100) << 1;
digits /= 100;
std.mem.copy(u8, result[olength + 1 - i - 2 ..], DIGIT_TABLE[c .. c + 2]);
i += 2;
}
if (digits >= 10) {
const c = digits << 1;
result[2] = DIGIT_TABLE[c + 1];
result[1] = '.';
result[0] = DIGIT_TABLE[c];
} else {
result[1] = '.';
result[0] = '0' + @intCast(u8, digits);
}
}
pub inline fn append_c_digits(result: []u8, count: u32, digits_: u32) void {
var digits = digits_;
var i: usize = 0;
while (i < count - 1) : (i += 2) {
const c = (digits % 100) << 1;
digits /= 100;
std.mem.copy(u8, result[count - i - 2 ..], DIGIT_TABLE[c .. c + 2]);
}
if (i < count) {
const c = '0' + @intCast(u8, digits % 10);
result[count - i - 1] = c;
}
}
pub inline fn append_n_digits(result: []u8, olength: u32, digits_: u32) void {
var digits = digits_;
var i: usize = 0;
while (digits >= 10000) {
const c = digits % 10000;
digits /= 10000;
const c0 = (c % 100) << 1;
const c1 = (c / 100) << 1;
std.mem.copy(u8, result[olength - i - 2 ..], DIGIT_TABLE[c0 .. c0 + 2]);
std.mem.copy(u8, result[olength - i - 4 ..], DIGIT_TABLE[c1 .. c1 + 2]);
i += 4;
}
if (digits >= 100) {
const c = (digits % 100) << 1;
digits /= 100;
std.mem.copy(u8, result[olength - i - 2 ..], DIGIT_TABLE[c .. c + 2]);
i += 2;
}
if (digits >= 10) {
const c = digits << 1;
std.mem.copy(u8, result[olength - i - 2 ..], DIGIT_TABLE[c .. c + 2]);
} else {
result[0] = '0' + @intCast(u8, digits);
}
}
pub inline fn append_nine_digits(result: []u8, digits_: u32) void {
var digits = digits_;
if (digits == 0) {
std.mem.set(u8, result[0..9], '0');
return;
}
var i: usize = 0;
while (i < 5) : (i += 4) {
const c = digits % 10000;
digits /= 10000;
const c0 = (c % 100) << 1;
const c1 = (c / 100) << 1;
std.mem.copy(u8, result[7 - i ..], DIGIT_TABLE[c0 .. c0 + 2]);
std.mem.copy(u8, result[5 - i ..], DIGIT_TABLE[c1 .. c1 + 2]);
}
result[0] = '0' + @intCast(u8, digits);
}
|
0 | repos | repos/exercism-ziglang/main.zig | const std = @import("std");
const print = std.debug.print;
pub fn main() !void {
print("Welcome to exercism exercises for Exilesprx!", .{});
}
|
0 | repos | repos/exercism-ziglang/tests.zig | const std = @import("std");
comptime {
_ = @import("armstrong-numbers/test_armstrong_numbers.zig");
_ = @import("bob/test_bob.zig");
_ = @import("collatz-conjecture/test_collatz_conjecture.zig");
_ = @import("darts/test_darts.zig");
_ = @import("difference-of-squares/test_difference_of_squares.zig");
_ = @import("grains/test_grains.zig");
_ = @import("hamming/test_hamming.zig");
_ = @import("isbn-verifier/test_isbn_verifier.zig");
_ = @import("isogram/test_isogram.zig");
_ = @import("leap/test_leap.zig");
_ = @import("luhn/test_luhn.zig");
_ = @import("matching-brackets/test_matching_brackets.zig");
_ = @import("nucleotide-count/test_nucleotide_count.zig");
_ = @import("pangram/test_pangram.zig");
_ = @import("perfect-numbers/test_perfect_numbers.zig");
_ = @import("queen-attack/queen_attack.zig");
_ = @import("resistor-color/test_resistor_color.zig");
_ = @import("resistor-color-duo/test_resistor_color_duo.zig");
_ = @import("scrabble-score/test_scrabble_score.zig");
_ = @import("space-age/test_space_age.zig");
_ = @import("triangle/test_triangle.zig");
}
test {
std.testing.refAllDecls(@This());
}
|
0 | repos | repos/exercism-ziglang/README.md | ## Exercism - Zig
|
0 | repos | repos/exercism-ziglang/build.zig.zon | .{
.name = "zig",
// This is a [Semantic Version](https://semver.org/).
// In a future version of Zig it will be used for package deduplication.
.version = "0.0.0",
// This field is optional.
// This is currently advisory only; Zig does not yet do anything
// with this value.
//.minimum_zig_version = "0.11.0",
// This field is optional.
// Each dependency must either provide a `url` and `hash`, or a `path`.
// `zig build --fetch` can be used to fetch all dependencies of a package, recursively.
// Once all dependencies are fetched, `zig build` no longer requires
// internet connectivity.
.dependencies = .{
// See `zig fetch --save <url>` for a command-line interface for adding dependencies.
//.example = .{
// // When updating this field to a new URL, be sure to delete the corresponding
// // `hash`, otherwise you are communicating that you expect to find the old hash at
// // the new URL.
// .url = "https://example.com/foo.tar.gz",
//
// // This is computed from the file contents of the directory of files that is
// // obtained after fetching `url` and applying the inclusion rules given by
// // `paths`.
// //
// // This field is the source of truth; packages do not come from a `url`; they
// // come from a `hash`. `url` is just one of many possible mirrors for how to
// // obtain a package matching this `hash`.
// //
// // Uses the [multihash](https://multiformats.io/multihash/) format.
// .hash = "...",
//
// // When this is provided, the package is found in a directory relative to the
// // build root. In this case the package's hash is irrelevant and therefore not
// // computed. This field and `url` are mutually exclusive.
// .path = "foo",
// // When this is set to `true`, a package is declared to be lazily
// // fetched. This makes the dependency only get fetched if it is
// // actually used.
// .lazy = false,
//},
},
// Specifies the set of files and directories that are included in this package.
// Only files and directories listed here are included in the `hash` that
// is computed for this package.
// Paths are relative to the build root. Use the empty string (`""`) to refer to
// the build root itself.
// A directory listed here means that all files within, recursively, are included.
.paths = .{
// This makes *all* files, recursively, included in this package. It is generally
// better to explicitly list the files and directories instead, to insure that
// fetching from tarballs, file system paths, and version control all result
// in the same contents hash.
"",
// For example...
//"build.zig",
//"build.zig.zon",
//"src",
//"LICENSE",
//"README.md",
},
}
|
0 | repos | repos/exercism-ziglang/build.zig | const std = @import("std");
// Although this function looks imperative, note that its job is to
// declaratively construct a build graph that will be executed by an external
// runner.
pub fn build(b: *std.Build) void {
// Standard target options allows the person running `zig build` to choose
// what target to build for. Here we do not override the defaults, which
// means any target is allowed, and the default is native. Other options
// for restricting supported target set are available.
const target = b.standardTargetOptions(.{});
// Standard optimization options allow the person running `zig build` to select
// between Debug, ReleaseSafe, ReleaseFast, and ReleaseSmall. Here we do not
// set a preferred release mode, allowing the user to decide how to optimize.
const optimize = b.standardOptimizeOption(.{});
const exe = b.addExecutable(.{
.name = "exercism",
.root_source_file = b.path("main.zig"),
.target = target,
.optimize = optimize,
});
const run_cmd = b.addRunArtifact(exe);
const run_step = b.step("run", "Run the app");
run_step.dependOn(&run_cmd.step);
// Creates a step for unit testing. This only builds the test executable
// but does not run it.
const lib_unit_tests = b.addTest(.{
.root_source_file = b.path("tests.zig"),
.target = target,
.optimize = optimize,
});
const run_lib_unit_tests = b.addRunArtifact(lib_unit_tests);
// Similar to creating the run step earlier, this exposes a `test` step to
// the `zig build --help` menu, providing a way for the user to request
// running the unit tests.
const test_step = b.step("test", "Run unit tests");
test_step.dependOn(&run_lib_unit_tests.step);
}
|
0 | repos/exercism-ziglang | repos/exercism-ziglang/grains/test_grains.zig | const std = @import("std");
const testing = std.testing;
const grains = @import("grains.zig");
const ChessboardError = grains.ChessboardError;
test "grains on square 1" {
const expected: u64 = 1;
const actual = try grains.square(1);
try testing.expectEqual(expected, actual);
}
test "grains on square 2" {
const expected: u64 = 2;
const actual = try grains.square(2);
try testing.expectEqual(expected, actual);
}
test "grains on square 3" {
const expected: u64 = 4;
const actual = try grains.square(3);
try testing.expectEqual(expected, actual);
}
test "grains on square 4" {
const expected: u64 = 8;
const actual = try grains.square(4);
try testing.expectEqual(expected, actual);
}
test "grains on square 16" {
const expected: u64 = 32_768;
const actual = try grains.square(16);
try testing.expectEqual(expected, actual);
}
test "grains on square 32" {
const expected: u64 = 2_147_483_648;
const actual = try grains.square(32);
try testing.expectEqual(expected, actual);
}
test "grains on square 64" {
const expected: u64 = 9_223_372_036_854_775_808;
const actual = try grains.square(64);
try testing.expectEqual(expected, actual);
}
test "square 0 produces an error" {
const expected = ChessboardError.IndexOutOfBounds;
const actual = grains.square(0);
try testing.expectError(expected, actual);
}
test "square greater than 64 produces an error" {
const expected = ChessboardError.IndexOutOfBounds;
const actual = grains.square(65);
try testing.expectError(expected, actual);
}
test "returns the total number of grains on the board" {
const expected: u64 = 18_446_744_073_709_551_615;
const actual = grains.total();
try testing.expectEqual(expected, actual);
}
|
0 | repos/exercism-ziglang | repos/exercism-ziglang/grains/README.md | # Grains
Welcome to Grains on Exercism's Zig Track.
If you need help running the tests or submitting your code, check out `HELP.md`.
## Instructions
Calculate the number of grains of wheat on a chessboard given that the number on each square doubles.
There once was a wise servant who saved the life of a prince.
The king promised to pay whatever the servant could dream up.
Knowing that the king loved chess, the servant told the king he would like to have grains of wheat.
One grain on the first square of a chess board, with the number of grains doubling on each successive square.
There are 64 squares on a chessboard (where square 1 has one grain, square 2 has two grains, and so on).
Write code that shows:
- how many grains were on a given square, and
- the total number of grains on the chessboard
## Source
### Created by
- @massivelivefun
### Contributed to by
- @ee7
### Based on
The CodeRanch Cattle Drive, Assignment 6 - https://coderanch.com/wiki/718824/Grains |
0 | repos/exercism-ziglang | repos/exercism-ziglang/grains/HELP.md | # Help
## Running the tests
Write your code in `<exercise_name>.zig`.
To run the tests for an exercise, run:
```bash
zig test test_exercise_name.zig
```
in the exercise's root directory (replacing `exercise_name` with the name of the exercise).
## Submitting your solution
You can submit your solution using the `exercism submit grains.zig` command.
This command will upload your solution to the Exercism website and print the solution page's URL.
It's possible to submit an incomplete solution which allows you to:
- See how others have completed the exercise
- Request help from a mentor
## Need to get help?
If you'd like help solving the exercise, check the following pages:
- The [Zig track's documentation](https://exercism.org/docs/tracks/zig)
- The [Zig track's programming category on the forum](https://forum.exercism.org/c/programming/zig)
- [Exercism's programming category on the forum](https://forum.exercism.org/c/programming/5)
- The [Frequently Asked Questions](https://exercism.org/docs/using/faqs)
Should those resources not suffice, you could submit your (incomplete) solution to request mentoring.
- [The Zig Programming Language Documentation][documentation] is a great overview of all of the language features that Zig provides to those who use it.
- [Zig Learn][zig-learn] is an excellent primer that explains the language features that Zig has to offer.
- [Ziglings][ziglings] is highly recommended.
Learn Zig by fixing tiny broken programs.
- [The Zig Programming Language Discord][discord-zig] is the main [Discord][discord].
It provides a great way to get in touch with the Zig community at large, and get some quick, direct help for any Zig related problem.
- [#zig][irc] on irc.freenode.net is the main Zig IRC channel.
- [/r/Zig][reddit] is the main Zig subreddit.
- [Stack Overflow][stack-overflow] can be used to discover code snippets and solutions to problems that may have already asked and maybe solved by others.
[discord]: https://discordapp.com
[discord-zig]: https://discord.com/invite/gxsFFjE
[documentation]: https://ziglang.org/documentation/master
[irc]: https://webchat.freenode.net/?channels=%23zig
[reddit]: https://www.reddit.com/r/Zig
[stack-overflow]: https://stackoverflow.com/questions/tagged/zig
[zig-learn]: https://ziglearn.org/
[ziglings]: https://github.com/ratfactor/ziglings |
0 | repos/exercism-ziglang | repos/exercism-ziglang/grains/grains.zig | const std = @import("std");
pub const ChessboardError = error{IndexOutOfBounds};
pub fn square(index: usize) ChessboardError!u64 {
if (index <= 0 or index >= 65) {
return ChessboardError.IndexOutOfBounds;
}
return @as(u64, @intCast(std.math.pow(u128, 2, index - 1)));
}
pub fn total() u64 {
return @as(u64, @intCast(std.math.pow(u128, 2, 64) - 1));
}
|
0 | repos/exercism-ziglang/grains | repos/exercism-ziglang/grains/.exercism/metadata.json | {"track":"zig","exercise":"grains","id":"d3d07c0ac7294b1ea9308377eabd8131","url":"https://exercism.org/tracks/zig/exercises/grains","handle":"exilesprx","is_requester":true,"auto_approve":false} |
0 | repos/exercism-ziglang/grains | repos/exercism-ziglang/grains/.exercism/config.json | {
"authors": [
"massivelivefun"
],
"contributors": [
"ee7"
],
"files": {
"solution": [
"grains.zig"
],
"test": [
"test_grains.zig"
],
"example": [
".meta/example.zig"
]
},
"blurb": "Calculate the number of grains of wheat on a chessboard given that the number on each square doubles.",
"source": "The CodeRanch Cattle Drive, Assignment 6",
"source_url": "https://coderanch.com/wiki/718824/Grains"
}
|
0 | repos/exercism-ziglang | repos/exercism-ziglang/bob/test_bob.zig | const std = @import("std");
const testing = std.testing;
const response = @import("bob.zig").response;
test "stating something" {
const expected = "Whatever.";
const actual = response("Tom-ay-to, tom-aaaah-to.");
try testing.expectEqualStrings(expected, actual);
}
test "shouting" {
const expected = "Whoa, chill out!";
const actual = response("WATCH OUT!");
try testing.expectEqualStrings(expected, actual);
}
test "shouting gibberish" {
const expected = "Whoa, chill out!";
const actual = response("FCECDFCAAB");
try testing.expectEqualStrings(expected, actual);
}
test "asking a question" {
const expected = "Sure.";
const actual = response("Does this cryogenic chamber make me look fat?");
try testing.expectEqualStrings(expected, actual);
}
test "asking a numeric question" {
const expected = "Sure.";
const actual = response("You are, what, like 15?");
try testing.expectEqualStrings(expected, actual);
}
test "asking gibberish" {
const expected = "Sure.";
const actual = response("fffbbcbeab?");
try testing.expectEqualStrings(expected, actual);
}
test "talking forcefully" {
const expected = "Whatever.";
const actual = response("Hi there!");
try testing.expectEqualStrings(expected, actual);
}
test "using acronyms in regular speech" {
const expected = "Whatever.";
const actual = response("It's OK if you don't want to go work for NASA.");
try testing.expectEqualStrings(expected, actual);
}
test "forceful question" {
const expected = "Calm down, I know what I'm doing!";
const actual = response("WHAT'S GOING ON?");
try testing.expectEqualStrings(expected, actual);
}
test "shouting numbers" {
const expected = "Whoa, chill out!";
const actual = response("1, 2, 3 GO!");
try testing.expectEqualStrings(expected, actual);
}
test "no letters" {
const expected = "Whatever.";
const actual = response("1, 2, 3");
try testing.expectEqualStrings(expected, actual);
}
test "question with no letters" {
const expected = "Sure.";
const actual = response("4?");
try testing.expectEqualStrings(expected, actual);
}
test "shouting with special characters" {
const expected = "Whoa, chill out!";
const actual = response("ZOMG THE %^*@#$(*^ ZOMBIES ARE COMING!!11!!1!");
try testing.expectEqualStrings(expected, actual);
}
test "shouting with no exclamation mark" {
const expected = "Whoa, chill out!";
const actual = response("I HATE THE DENTIST");
try testing.expectEqualStrings(expected, actual);
}
test "statement containing question mark" {
const expected = "Whatever.";
const actual = response("Ending with ? means a question.");
try testing.expectEqualStrings(expected, actual);
}
test "non-letters with question" {
const expected = "Sure.";
const actual = response(":) ?");
try testing.expectEqualStrings(expected, actual);
}
test "prattling on" {
const expected = "Sure.";
const actual = response("Wait! Hang on. Are you going to be OK?");
try testing.expectEqualStrings(expected, actual);
}
test "silence" {
const expected = "Fine. Be that way!";
const actual = response("");
try testing.expectEqualStrings(expected, actual);
}
test "prolonged silence" {
const expected = "Fine. Be that way!";
const actual = response(" ");
try testing.expectEqualStrings(expected, actual);
}
test "alternate silence" {
const expected = "Fine. Be that way!";
const actual = response("\t\t\t\t\t\t\t\t\t\t");
try testing.expectEqualStrings(expected, actual);
}
test "multiple line question" {
const expected = "Whatever.";
const actual = response("\nDoes this cryogenic chamber make me look fat?\nNo.");
try testing.expectEqualStrings(expected, actual);
}
test "starting with whitespace" {
const expected = "Whatever.";
const actual = response(" hmmmmmmm...");
try testing.expectEqualStrings(expected, actual);
}
test "ending with whitespace" {
const expected = "Sure.";
const actual = response("Okay if like my spacebar quite a bit? ");
try testing.expectEqualStrings(expected, actual);
}
test "other whitespace" {
const expected = "Fine. Be that way!";
const actual = response("\n\r \t");
try testing.expectEqualStrings(expected, actual);
}
test "non-question ending with whitespace" {
const expected = "Whatever.";
const actual = response("This is a statement ending with whitespace ");
try testing.expectEqualStrings(expected, actual);
}
|
0 | repos/exercism-ziglang | repos/exercism-ziglang/bob/bob.zig | const std = @import("std");
pub fn response(s: []const u8) []const u8 {
const phrase = std.mem.trim(u8, s, &std.ascii.whitespace);
if (phrase.len == 0) {
return "Fine. Be that way!";
}
const is_question = phrase[phrase.len - 1] == '?';
const is_yelling = isAllCaps(phrase);
if (is_question and is_yelling) {
return "Calm down, I know what I'm doing!";
} else if (is_question) {
return "Sure.";
} else if (is_yelling) {
return "Whoa, chill out!";
}
return "Whatever.";
}
fn isAllCaps(s: []const u8) bool {
var is_all_caps = false;
for (s) |c| {
switch (c) {
'a'...'z' => return false,
'A'...'Z' => is_all_caps = true,
else => continue,
}
}
return is_all_caps;
}
|
0 | repos/exercism-ziglang | repos/exercism-ziglang/bob/README.md | # Bob
Welcome to Bob on Exercism's Zig Track.
If you need help running the tests or submitting your code, check out `HELP.md`.
## Introduction
Bob is a [lackadaisical][] teenager.
He likes to think that he's very cool.
And he definitely doesn't get excited about things.
That wouldn't be cool.
When people talk to him, his responses are pretty limited.
[lackadaisical]: https://www.collinsdictionary.com/dictionary/english/lackadaisical
## Instructions
Your task is to determine what Bob will reply to someone when they say something to him or ask him a question.
Bob only ever answers one of five things:
- **"Sure."**
This is his response if you ask him a question, such as "How are you?"
The convention used for questions is that it ends with a question mark.
- **"Whoa, chill out!"**
This is his answer if you YELL AT HIM.
The convention used for yelling is ALL CAPITAL LETTERS.
- **"Calm down, I know what I'm doing!"**
This is what he says if you yell a question at him.
- **"Fine. Be that way!"**
This is how he responds to silence.
The convention used for silence is nothing, or various combinations of whitespace characters.
- **"Whatever."**
This is what he answers to anything else.
## Source
### Created by
- @ee7
### Based on
Inspired by the 'Deaf Grandma' exercise in Chris Pine's Learn to Program tutorial. - https://pine.fm/LearnToProgram/?Chapter=06 |
0 | repos/exercism-ziglang | repos/exercism-ziglang/bob/HELP.md | # Help
## Running the tests
Write your code in `<exercise_name>.zig`.
To run the tests for an exercise, run:
```bash
zig test test_exercise_name.zig
```
in the exercise's root directory (replacing `exercise_name` with the name of the exercise).
## Submitting your solution
You can submit your solution using the `exercism submit bob.zig` command.
This command will upload your solution to the Exercism website and print the solution page's URL.
It's possible to submit an incomplete solution which allows you to:
- See how others have completed the exercise
- Request help from a mentor
## Need to get help?
If you'd like help solving the exercise, check the following pages:
- The [Zig track's documentation](https://exercism.org/docs/tracks/zig)
- The [Zig track's programming category on the forum](https://forum.exercism.org/c/programming/zig)
- [Exercism's programming category on the forum](https://forum.exercism.org/c/programming/5)
- The [Frequently Asked Questions](https://exercism.org/docs/using/faqs)
Should those resources not suffice, you could submit your (incomplete) solution to request mentoring.
- [The Zig Programming Language Documentation][documentation] is a great overview of all of the language features that Zig provides to those who use it.
- [Zig Guide][zig-guide] is an excellent primer that explains the language features that Zig has to offer.
- [Ziglings][ziglings] is highly recommended.
Learn Zig by fixing tiny broken programs.
- [The Zig Programming Language Discord][discord-zig] is the main [Discord][discord].
It provides a great way to get in touch with the Zig community at large, and get some quick, direct help for any Zig related problem.
- [#zig][irc] on irc.freenode.net is the main Zig IRC channel.
- [/r/Zig][reddit] is the main Zig subreddit.
- [Stack Overflow][stack-overflow] can be used to discover code snippets and solutions to problems that may have already asked and maybe solved by others.
[discord]: https://discordapp.com
[discord-zig]: https://discord.com/invite/gxsFFjE
[documentation]: https://ziglang.org/documentation/master
[irc]: https://webchat.freenode.net/?channels=%23zig
[reddit]: https://www.reddit.com/r/Zig
[stack-overflow]: https://stackoverflow.com/questions/tagged/zig
[zig-guide]: https://zig.guide/
[ziglings]: https://codeberg.org/ziglings/exercises |
0 | repos/exercism-ziglang/bob | repos/exercism-ziglang/bob/.exercism/metadata.json | {"track":"zig","exercise":"bob","id":"76cd72719f5943439bee873b87b657a9","url":"https://exercism.org/tracks/zig/exercises/bob","handle":"exilesprx","is_requester":true,"auto_approve":false} |
0 | repos/exercism-ziglang/bob | repos/exercism-ziglang/bob/.exercism/config.json | {
"authors": [
"ee7"
],
"files": {
"solution": [
"bob.zig"
],
"test": [
"test_bob.zig"
],
"example": [
".meta/example.zig"
]
},
"blurb": "Bob is a lackadaisical teenager. In conversation, his responses are very limited.",
"source": "Inspired by the 'Deaf Grandma' exercise in Chris Pine's Learn to Program tutorial.",
"source_url": "https://pine.fm/LearnToProgram/?Chapter=06"
}
|
0 | repos/exercism-ziglang | repos/exercism-ziglang/perfect-numbers/test_perfect_numbers.zig | const std = @import("std");
const testing = std.testing;
const perfect_numbers = @import("perfect_numbers.zig");
const Classification = perfect_numbers.Classification;
const classify = perfect_numbers.classify;
test "smallest perfect number is classified correctly" {
const expected = Classification.perfect;
const actual = classify(6);
try testing.expectEqual(expected, actual);
}
test "medium perfect number is classified correctly" {
const expected = Classification.perfect;
const actual = classify(28);
try testing.expectEqual(expected, actual);
}
test "large perfect number is classified correctly" {
const expected = Classification.perfect;
const actual = classify(33_550_336);
try testing.expectEqual(expected, actual);
}
test "smallest abundant number is classified correctly" {
const expected = Classification.abundant;
const actual = classify(12);
try testing.expectEqual(expected, actual);
}
test "medium abundant number is classified correctly" {
const expected = Classification.abundant;
const actual = classify(30);
try testing.expectEqual(expected, actual);
}
test "large abundant number is classified correctly" {
const expected = Classification.abundant;
const actual = classify(33_550_335);
try testing.expectEqual(expected, actual);
}
test "smallest prime deficient number is classified correctly" {
const expected = Classification.deficient;
const actual = classify(2);
try testing.expectEqual(expected, actual);
}
test "smallest non-prime deficient number is classified correctly" {
const expected = Classification.deficient;
const actual = classify(4);
try testing.expectEqual(expected, actual);
}
test "medium deficient number is classified correctly" {
const expected = Classification.deficient;
const actual = classify(32);
try testing.expectEqual(expected, actual);
}
test "large deficient number is classified correctly" {
const expected = Classification.deficient;
const actual = classify(33_550_337);
try testing.expectEqual(expected, actual);
}
test "edge case (no factors other than itself) is classified correctly" {
const expected = Classification.deficient;
const actual = classify(1);
try testing.expectEqual(expected, actual);
}
|
0 | repos/exercism-ziglang | repos/exercism-ziglang/perfect-numbers/perfect_numbers.zig | const std = @import("std");
const assert = std.debug.assert;
pub const Classification = enum {
deficient,
perfect,
abundant,
};
/// Asserts that `n` is nonzero.
pub fn classify(n: u64) Classification {
assert(n != 0);
var i: u64 = 1;
var aliquot_sum: u128 = 0;
while (i < n) : (i += 1) {
if (n % i == 0) {
aliquot_sum += i;
}
}
if (n < aliquot_sum) {
return Classification.abundant;
} else if (n > aliquot_sum) {
return Classification.deficient;
}
return Classification.perfect;
}
|
0 | repos/exercism-ziglang | repos/exercism-ziglang/perfect-numbers/README.md | # Perfect Numbers
Welcome to Perfect Numbers on Exercism's Zig Track.
If you need help running the tests or submitting your code, check out `HELP.md`.
## Instructions
Determine if a number is perfect, abundant, or deficient based on Nicomachus' (60 - 120 CE) classification scheme for positive integers.
The Greek mathematician [Nicomachus][nicomachus] devised a classification scheme for positive integers, identifying each as belonging uniquely to the categories of [perfect](#perfect), [abundant](#abundant), or [deficient](#deficient) based on their [aliquot sum][aliquot-sum].
The _aliquot sum_ is defined as the sum of the factors of a number not including the number itself.
For example, the aliquot sum of `15` is `1 + 3 + 5 = 9`.
## Perfect
A number is perfect when it equals its aliquot sum.
For example:
- `6` is a perfect number because `1 + 2 + 3 = 6`
- `28` is a perfect number because `1 + 2 + 4 + 7 + 14 = 28`
## Abundant
A number is abundant when it is less than its aliquot sum.
For example:
- `12` is an abundant number because `1 + 2 + 3 + 4 + 6 = 16`
- `24` is an abundant number because `1 + 2 + 3 + 4 + 6 + 8 + 12 = 36`
## Deficient
A number is deficient when it is greater than its aliquot sum.
For example:
- `8` is a deficient number because `1 + 2 + 4 = 7`
- Prime numbers are deficient
## Task
Implement a way to determine whether a given number is [perfect](#perfect).
Depending on your language track, you may also need to implement a way to determine whether a given number is [abundant](#abundant) or [deficient](#deficient).
[nicomachus]: https://en.wikipedia.org/wiki/Nicomachus
[aliquot-sum]: https://en.wikipedia.org/wiki/Aliquot_sum
## Assert
For this exercise, let's say that we want the caller to be responsible for calling `classify` only with a nonzero input.
So please make the `classify` function assert that its input is nonzero.
For more details, see the [Zig Language Reference][zig-reference] and the implementation of [`std.debug.assert`][assert].
However, note that this exercise does not currently test an input of 0 (because `std.testing` does [not yet support expecting a panic][proposal]).
[zig-reference]: https://ziglang.org/documentation/0.13.0/#unreachable
[assert]: https://github.com/ziglang/zig/blob/0.13.0/lib/std/debug.zig#L401-L413
[proposal]: https://github.com/ziglang/zig/issues/1356
## Source
### Created by
- @ee7
### Based on
Taken from Chapter 2 of Functional Thinking by Neal Ford. - https://www.oreilly.com/library/view/functional-thinking/9781449365509/ |
0 | repos/exercism-ziglang | repos/exercism-ziglang/perfect-numbers/HELP.md | # Help
## Running the tests
Write your code in `<exercise_name>.zig`.
To run the tests for an exercise, run:
```bash
zig test test_exercise_name.zig
```
in the exercise's root directory (replacing `exercise_name` with the name of the exercise).
## Submitting your solution
You can submit your solution using the `exercism submit perfect_numbers.zig` command.
This command will upload your solution to the Exercism website and print the solution page's URL.
It's possible to submit an incomplete solution which allows you to:
- See how others have completed the exercise
- Request help from a mentor
## Need to get help?
If you'd like help solving the exercise, check the following pages:
- The [Zig track's documentation](https://exercism.org/docs/tracks/zig)
- The [Zig track's programming category on the forum](https://forum.exercism.org/c/programming/zig)
- [Exercism's programming category on the forum](https://forum.exercism.org/c/programming/5)
- The [Frequently Asked Questions](https://exercism.org/docs/using/faqs)
Should those resources not suffice, you could submit your (incomplete) solution to request mentoring.
- [The Zig Programming Language Documentation][documentation] is a great overview of all of the language features that Zig provides to those who use it.
- [Zig Guide][zig-guide] is an excellent primer that explains the language features that Zig has to offer.
- [Ziglings][ziglings] is highly recommended.
Learn Zig by fixing tiny broken programs.
- [The Zig Programming Language Discord][discord-zig] is the main [Discord][discord].
It provides a great way to get in touch with the Zig community at large, and get some quick, direct help for any Zig related problem.
- [#zig][irc] on irc.freenode.net is the main Zig IRC channel.
- [/r/Zig][reddit] is the main Zig subreddit.
- [Stack Overflow][stack-overflow] can be used to discover code snippets and solutions to problems that may have already asked and maybe solved by others.
[discord]: https://discordapp.com
[discord-zig]: https://discord.com/invite/gxsFFjE
[documentation]: https://ziglang.org/documentation/master
[irc]: https://webchat.freenode.net/?channels=%23zig
[reddit]: https://www.reddit.com/r/Zig
[stack-overflow]: https://stackoverflow.com/questions/tagged/zig
[zig-guide]: https://zig.guide/
[ziglings]: https://codeberg.org/ziglings/exercises |
0 | repos/exercism-ziglang/perfect-numbers | repos/exercism-ziglang/perfect-numbers/.exercism/metadata.json | {"track":"zig","exercise":"perfect-numbers","id":"0061dcdc9a6a4e68ae0f1e5570610688","url":"https://exercism.org/tracks/zig/exercises/perfect-numbers","handle":"exilesprx","is_requester":true,"auto_approve":false} |
0 | repos/exercism-ziglang/perfect-numbers | repos/exercism-ziglang/perfect-numbers/.exercism/config.json | {
"authors": [
"ee7"
],
"files": {
"solution": [
"perfect_numbers.zig"
],
"test": [
"test_perfect_numbers.zig"
],
"example": [
".meta/example.zig"
]
},
"blurb": "Determine if a number is perfect, abundant, or deficient based on Nicomachus' (60 - 120 CE) classification scheme for positive integers.",
"source": "Taken from Chapter 2 of Functional Thinking by Neal Ford.",
"source_url": "https://www.oreilly.com/library/view/functional-thinking/9781449365509/"
}
|
0 | repos/exercism-ziglang | repos/exercism-ziglang/hamming/test_hamming.zig | const std = @import("std");
const testing = std.testing;
const hamming = @import("hamming.zig");
const DnaError = hamming.DnaError;
test "empty strands" {
const expected = DnaError.EmptyDnaStrands;
const actual = hamming.compute("", "");
try testing.expectError(expected, actual);
}
test "single letter identical strands" {
const expected: usize = 0;
const actual = try hamming.compute("A", "A");
try testing.expectEqual(expected, actual);
}
test "single letter different strands" {
const expected: usize = 1;
const actual = try hamming.compute("G", "T");
try testing.expectEqual(expected, actual);
}
test "long identical strands" {
const expected: usize = 0;
const actual = try hamming.compute("GGACTGAAATCTG", "GGACTGAAATCTG");
try testing.expectEqual(expected, actual);
}
test "long different strands" {
const expected: usize = 9;
const actual = try hamming.compute("GGACGGATTCTG", "AGGACGGATTCT");
try testing.expectEqual(expected, actual);
}
test "disallow first strand longer" {
const expected = DnaError.UnequalDnaStrands;
const actual = hamming.compute("AATG", "AAA");
try testing.expectError(expected, actual);
}
test "disallow second strand longer" {
const expected = DnaError.UnequalDnaStrands;
const actual = hamming.compute("ATA", "AGTG");
try testing.expectError(expected, actual);
}
test "disallow left empty strand" {
const expected = DnaError.EmptyDnaStrands;
const actual = hamming.compute("", "G");
try testing.expectError(expected, actual);
}
test "disallow right empty strand" {
const expected = DnaError.EmptyDnaStrands;
const actual = hamming.compute("G", "");
try testing.expectError(expected, actual);
}
|
0 | repos/exercism-ziglang | repos/exercism-ziglang/hamming/hamming.zig | const std = @import("std");
const print = std.debug.print;
pub const DnaError = error{ EmptyDnaStrands, UnequalDnaStrands };
pub fn compute(first: []const u8, second: []const u8) DnaError!usize {
if (first.len == 0 or second.len == 0) {
return DnaError.EmptyDnaStrands;
}
if (first.len != second.len) {
return DnaError.UnequalDnaStrands;
}
var hamming: usize = 0;
for (first, second) |c, b| {
if (c != b) {
hamming += 1;
}
}
return hamming;
}
|
0 | repos/exercism-ziglang | repos/exercism-ziglang/hamming/README.md | # Hamming
Welcome to Hamming on Exercism's Zig Track.
If you need help running the tests or submitting your code, check out `HELP.md`.
## Instructions
Calculate the Hamming Distance between two DNA strands.
Your body is made up of cells that contain DNA.
Those cells regularly wear out and need replacing, which they achieve by dividing into daughter cells.
In fact, the average human body experiences about 10 quadrillion cell divisions in a lifetime!
When cells divide, their DNA replicates too.
Sometimes during this process mistakes happen and single pieces of DNA get encoded with the incorrect information.
If we compare two strands of DNA and count the differences between them we can see how many mistakes occurred.
This is known as the "Hamming Distance".
We read DNA using the letters C,A,G and T.
Two strands might look like this:
GAGCCTACTAACGGGAT
CATCGTAATGACGGCCT
^ ^ ^ ^ ^ ^^
They have 7 differences, and therefore the Hamming Distance is 7.
The Hamming Distance is useful for lots of things in science, not just biology, so it's a nice phrase to be familiar with :)
## Implementation notes
The Hamming distance is only defined for sequences of equal length, so an attempt to calculate it between sequences of different lengths should not work.
## Source
### Created by
- @massivelivefun
### Based on
The Calculating Point Mutations problem at Rosalind - https://rosalind.info/problems/hamm/ |
0 | repos/exercism-ziglang | repos/exercism-ziglang/hamming/HELP.md | # Help
## Running the tests
Write your code in `<exercise_name>.zig`.
To run the tests for an exercise, run:
```bash
zig test test_exercise_name.zig
```
in the exercise's root directory (replacing `exercise_name` with the name of the exercise).
## Submitting your solution
You can submit your solution using the `exercism submit hamming.zig` command.
This command will upload your solution to the Exercism website and print the solution page's URL.
It's possible to submit an incomplete solution which allows you to:
- See how others have completed the exercise
- Request help from a mentor
## Need to get help?
If you'd like help solving the exercise, check the following pages:
- The [Zig track's documentation](https://exercism.org/docs/tracks/zig)
- The [Zig track's programming category on the forum](https://forum.exercism.org/c/programming/zig)
- [Exercism's programming category on the forum](https://forum.exercism.org/c/programming/5)
- The [Frequently Asked Questions](https://exercism.org/docs/using/faqs)
Should those resources not suffice, you could submit your (incomplete) solution to request mentoring.
- [The Zig Programming Language Documentation][documentation] is a great overview of all of the language features that Zig provides to those who use it.
- [Zig Learn][zig-learn] is an excellent primer that explains the language features that Zig has to offer.
- [Ziglings][ziglings] is highly recommended.
Learn Zig by fixing tiny broken programs.
- [The Zig Programming Language Discord][discord-zig] is the main [Discord][discord].
It provides a great way to get in touch with the Zig community at large, and get some quick, direct help for any Zig related problem.
- [#zig][irc] on irc.freenode.net is the main Zig IRC channel.
- [/r/Zig][reddit] is the main Zig subreddit.
- [Stack Overflow][stack-overflow] can be used to discover code snippets and solutions to problems that may have already asked and maybe solved by others.
[discord]: https://discordapp.com
[discord-zig]: https://discord.com/invite/gxsFFjE
[documentation]: https://ziglang.org/documentation/master
[irc]: https://webchat.freenode.net/?channels=%23zig
[reddit]: https://www.reddit.com/r/Zig
[stack-overflow]: https://stackoverflow.com/questions/tagged/zig
[zig-learn]: https://ziglearn.org/
[ziglings]: https://github.com/ratfactor/ziglings |
0 | repos/exercism-ziglang/hamming | repos/exercism-ziglang/hamming/.exercism/metadata.json | {"track":"zig","exercise":"hamming","id":"1b7b98a964984fcd8f458bbc06a4b901","url":"https://exercism.org/tracks/zig/exercises/hamming","handle":"exilesprx","is_requester":true,"auto_approve":false} |
0 | repos/exercism-ziglang/hamming | repos/exercism-ziglang/hamming/.exercism/config.json | {
"authors": [
"massivelivefun"
],
"files": {
"solution": [
"hamming.zig"
],
"test": [
"test_hamming.zig"
],
"example": [
".meta/example.zig"
]
},
"blurb": "Calculate the Hamming difference between two DNA strands.",
"source": "The Calculating Point Mutations problem at Rosalind",
"source_url": "https://rosalind.info/problems/hamm/"
}
|
0 | repos/exercism-ziglang | repos/exercism-ziglang/collatz-conjecture/test_collatz_conjecture.zig | const std = @import("std");
const testing = std.testing;
const collatz_conjecture = @import("collatz_conjecture.zig");
const ComputationError = collatz_conjecture.ComputationError;
test "zero steps for one" {
const expected: usize = 0;
const actual = try collatz_conjecture.steps(1);
try testing.expectEqual(expected, actual);
}
test "divide if even" {
const expected: usize = 4;
const actual = try collatz_conjecture.steps(16);
try testing.expectEqual(expected, actual);
}
test "even and odd steps" {
const expected: usize = 9;
const actual = try collatz_conjecture.steps(12);
try testing.expectEqual(expected, actual);
}
test "large number of even and odd steps" {
const expected: usize = 152;
const actual = try collatz_conjecture.steps(1_000_000);
try testing.expectEqual(expected, actual);
}
test "zero is an error" {
const expected = ComputationError.IllegalArgument;
const actual = collatz_conjecture.steps(0);
try testing.expectError(expected, actual);
}
|
0 | repos/exercism-ziglang | repos/exercism-ziglang/collatz-conjecture/collatz_conjecture.zig | // Please implement the `ComputationError.IllegalArgument` error.
pub const ComputationError = error{
IllegalArgument,
};
pub fn steps(number: usize) anyerror!usize {
if (number == 0) {
return ComputationError.IllegalArgument;
}
var num: usize = number;
var i: usize = 0;
while (num != 1) {
if (num % 2 == 0) {
num /= 2;
i += 1;
continue;
}
num = 3 * num + 1;
i += 1;
}
return i;
}
|
0 | repos/exercism-ziglang | repos/exercism-ziglang/collatz-conjecture/README.md | # Collatz Conjecture
Welcome to Collatz Conjecture on Exercism's Zig Track.
If you need help running the tests or submitting your code, check out `HELP.md`.
## Instructions
The Collatz Conjecture or 3x+1 problem can be summarized as follows:
Take any positive integer n.
If n is even, divide n by 2 to get n / 2.
If n is odd, multiply n by 3 and add 1 to get 3n + 1.
Repeat the process indefinitely.
The conjecture states that no matter which number you start with, you will always reach 1 eventually.
Given a number n, return the number of steps required to reach 1.
## Examples
Starting with n = 12, the steps would be as follows:
0. 12
1. 6
2. 3
3. 10
4. 5
5. 16
6. 8
7. 4
8. 2
9. 1
Resulting in 9 steps.
So for input n = 12, the return value would be 9.
## Error handling
For this exercise you must add an error set `ComputationError` that contains the `IllegalArgument` error.
Remember to make it public!
The `steps` function must return `ComputationError.IllegalArgument` when its input is equal to zero.
Later exercises will usually omit explicit instructions like this.
In general, Exercism expects you to read the test file when implementing your solution.
For more details about errors in Zig, see:
- [Learning Zig - Errors][learning-zig-errors]
- [Ziglings - Exercise 21][ziglings-exercise-21]
- [Zighelp - Errors][zighelp-errors]
[learning-zig-errors]: https://www.openmymind.net/learning_zig/language_overview_2/#errors
[zighelp-errors]: https://zighelp.org/chapter-1/#errors
[ziglings-exercise-21]: https://codeberg.org/ziglings/exercises/src/commit/0d46acfa02d0c29fdfb3651e82a77284dd8f2e00/exercises/021_errors.zig
## Source
### Created by
- @massivelivefun
### Contributed to by
- @ee7
### Based on
An unsolved problem in mathematics named after mathematician Lothar Collatz - https://en.wikipedia.org/wiki/3x_%2B_1_problem |
0 | repos/exercism-ziglang | repos/exercism-ziglang/collatz-conjecture/HELP.md | # Help
## Running the tests
Write your code in `<exercise_name>.zig`.
To run the tests for an exercise, run:
```bash
zig test test_exercise_name.zig
```
in the exercise's root directory (replacing `exercise_name` with the name of the exercise).
## Submitting your solution
You can submit your solution using the `exercism submit collatz_conjecture.zig` command.
This command will upload your solution to the Exercism website and print the solution page's URL.
It's possible to submit an incomplete solution which allows you to:
- See how others have completed the exercise
- Request help from a mentor
## Need to get help?
If you'd like help solving the exercise, check the following pages:
- The [Zig track's documentation](https://exercism.org/docs/tracks/zig)
- The [Zig track's programming category on the forum](https://forum.exercism.org/c/programming/zig)
- [Exercism's programming category on the forum](https://forum.exercism.org/c/programming/5)
- The [Frequently Asked Questions](https://exercism.org/docs/using/faqs)
Should those resources not suffice, you could submit your (incomplete) solution to request mentoring.
- [The Zig Programming Language Documentation][documentation] is a great overview of all of the language features that Zig provides to those who use it.
- [Zig Learn][zig-learn] is an excellent primer that explains the language features that Zig has to offer.
- [Ziglings][ziglings] is highly recommended.
Learn Zig by fixing tiny broken programs.
- [The Zig Programming Language Discord][discord-zig] is the main [Discord][discord].
It provides a great way to get in touch with the Zig community at large, and get some quick, direct help for any Zig related problem.
- [#zig][irc] on irc.freenode.net is the main Zig IRC channel.
- [/r/Zig][reddit] is the main Zig subreddit.
- [Stack Overflow][stack-overflow] can be used to discover code snippets and solutions to problems that may have already asked and maybe solved by others.
[discord]: https://discordapp.com
[discord-zig]: https://discord.com/invite/gxsFFjE
[documentation]: https://ziglang.org/documentation/master
[irc]: https://webchat.freenode.net/?channels=%23zig
[reddit]: https://www.reddit.com/r/Zig
[stack-overflow]: https://stackoverflow.com/questions/tagged/zig
[zig-learn]: https://ziglearn.org/
[ziglings]: https://github.com/ratfactor/ziglings |
0 | repos/exercism-ziglang/collatz-conjecture | repos/exercism-ziglang/collatz-conjecture/.exercism/metadata.json | {"track":"zig","exercise":"collatz-conjecture","id":"9ffdc4ad8a964954b170148a622dc40a","url":"https://exercism.org/tracks/zig/exercises/collatz-conjecture","handle":"exilesprx","is_requester":true,"auto_approve":false} |
0 | repos/exercism-ziglang/collatz-conjecture | repos/exercism-ziglang/collatz-conjecture/.exercism/config.json | {
"authors": [
"massivelivefun"
],
"contributors": [
"ee7"
],
"files": {
"solution": [
"collatz_conjecture.zig"
],
"test": [
"test_collatz_conjecture.zig"
],
"example": [
".meta/example.zig"
]
},
"blurb": "Calculate the number of steps to reach 1 using the Collatz conjecture.",
"source": "An unsolved problem in mathematics named after mathematician Lothar Collatz",
"source_url": "https://en.wikipedia.org/wiki/3x_%2B_1_problem"
}
|
0 | repos/exercism-ziglang | repos/exercism-ziglang/queen-attack/queen_attack.zig | pub const QueenError = error{
InitializationFailure,
};
pub const Queen = struct {
row: i8,
col: i8,
pub fn init(row: i8, col: i8) QueenError!Queen {
if (row < 0 or col < 0 or row > 7 or col > 7) {
return QueenError.InitializationFailure;
}
return Queen{ .row = row, .col = col };
}
pub fn canAttack(self: Queen, other: Queen) QueenError!bool {
return self.row == other.row or self.col == other.col or @abs(self.row - other.row) == @abs(self.col - other.col);
}
};
|
0 | repos/exercism-ziglang | repos/exercism-ziglang/queen-attack/README.md | # Queen Attack
Welcome to Queen Attack on Exercism's Zig Track.
If you need help running the tests or submitting your code, check out `HELP.md`.
## Instructions
Given the position of two queens on a chess board, indicate whether or not they are positioned so that they can attack each other.
In the game of chess, a queen can attack pieces which are on the same row, column, or diagonal.
A chessboard can be represented by an 8 by 8 array.
So if you are told the white queen is at `c5` (zero-indexed at column 2, row 3) and the black queen at `f2` (zero-indexed at column 5, row 6), then you know that the set-up is like so:

You are also able to answer whether the queens can attack each other.
In this case, that answer would be yes, they can, because both pieces share a diagonal.
## Credit
The chessboard image was made by [habere-et-dispertire][habere-et-dispertire] using LaTeX and the [chessboard package][chessboard-package] by Ulrike Fischer.
[habere-et-dispertire]: https://exercism.org/profiles/habere-et-dispertire
[chessboard-package]: https://github.com/u-fischer/chessboard
## Source
### Created by
- @massivelivefun
### Contributed to by
- @ee7
### Based on
J Dalbey's Programming Practice problems - https://users.csc.calpoly.edu/~jdalbey/103/Projects/ProgrammingPractice.html |
0 | repos/exercism-ziglang | repos/exercism-ziglang/queen-attack/HELP.md | # Help
## Running the tests
Write your code in `<exercise_name>.zig`.
To run the tests for an exercise, run:
```bash
zig test test_exercise_name.zig
```
in the exercise's root directory (replacing `exercise_name` with the name of the exercise).
## Submitting your solution
You can submit your solution using the `exercism submit queen_attack.zig` command.
This command will upload your solution to the Exercism website and print the solution page's URL.
It's possible to submit an incomplete solution which allows you to:
- See how others have completed the exercise
- Request help from a mentor
## Need to get help?
If you'd like help solving the exercise, check the following pages:
- The [Zig track's documentation](https://exercism.org/docs/tracks/zig)
- The [Zig track's programming category on the forum](https://forum.exercism.org/c/programming/zig)
- [Exercism's programming category on the forum](https://forum.exercism.org/c/programming/5)
- The [Frequently Asked Questions](https://exercism.org/docs/using/faqs)
Should those resources not suffice, you could submit your (incomplete) solution to request mentoring.
- [The Zig Programming Language Documentation][documentation] is a great overview of all of the language features that Zig provides to those who use it.
- [Zig Guide][zig-guide] is an excellent primer that explains the language features that Zig has to offer.
- [Ziglings][ziglings] is highly recommended.
Learn Zig by fixing tiny broken programs.
- [The Zig Programming Language Discord][discord-zig] is the main [Discord][discord].
It provides a great way to get in touch with the Zig community at large, and get some quick, direct help for any Zig related problem.
- [#zig][irc] on irc.freenode.net is the main Zig IRC channel.
- [/r/Zig][reddit] is the main Zig subreddit.
- [Stack Overflow][stack-overflow] can be used to discover code snippets and solutions to problems that may have already asked and maybe solved by others.
[discord]: https://discordapp.com
[discord-zig]: https://discord.com/invite/gxsFFjE
[documentation]: https://ziglang.org/documentation/master
[irc]: https://webchat.freenode.net/?channels=%23zig
[reddit]: https://www.reddit.com/r/Zig
[stack-overflow]: https://stackoverflow.com/questions/tagged/zig
[zig-guide]: https://zig.guide/
[ziglings]: https://codeberg.org/ziglings/exercises |
0 | repos/exercism-ziglang | repos/exercism-ziglang/queen-attack/test_queen_attack.zig | const std = @import("std");
const testing = std.testing;
const queen_attack = @import("queen_attack.zig");
const QueenError = queen_attack.QueenError;
test "queen has exactly two fields" {
try testing.expectEqual(2, std.meta.fields(queen_attack.Queen).len);
}
test "queen with a valid position" {
const queen = try queen_attack.Queen.init(2, 2);
// Allow the fields to have any name.
const fields = std.meta.fields(@TypeOf(queen));
inline for (fields) |f| {
const actual = @field(queen, f.name);
const expected = @as(@TypeOf(actual), 2);
try testing.expectEqual(expected, actual);
}
}
test "queen must have positive row" {
const queen = queen_attack.Queen.init(-2, 2);
try testing.expectError(QueenError.InitializationFailure, queen);
}
test "queen must have row on board" {
const queen = queen_attack.Queen.init(8, 4);
try testing.expectError(QueenError.InitializationFailure, queen);
}
test "queen must have positive column" {
const queen = queen_attack.Queen.init(2, -2);
try testing.expectError(QueenError.InitializationFailure, queen);
}
test "queen must have column on board" {
const queen = queen_attack.Queen.init(4, 8);
try testing.expectError(QueenError.InitializationFailure, queen);
}
test "cannot attack" {
const white = try queen_attack.Queen.init(2, 4);
const black = try queen_attack.Queen.init(6, 6);
try testing.expect(!try white.canAttack(black));
}
test "can attack on same row" {
const white = try queen_attack.Queen.init(2, 4);
const black = try queen_attack.Queen.init(2, 6);
try testing.expect(try white.canAttack(black));
}
test "can attack on same column" {
const white = try queen_attack.Queen.init(4, 5);
const black = try queen_attack.Queen.init(2, 5);
try testing.expect(try white.canAttack(black));
}
test "can attack on first diagonal" {
const white = try queen_attack.Queen.init(2, 2);
const black = try queen_attack.Queen.init(0, 4);
try testing.expect(try white.canAttack(black));
}
test "can attack on second diagonal" {
const white = try queen_attack.Queen.init(2, 2);
const black = try queen_attack.Queen.init(3, 1);
try testing.expect(try white.canAttack(black));
}
test "can attack on third diagonal" {
const white = try queen_attack.Queen.init(2, 2);
const black = try queen_attack.Queen.init(1, 1);
try testing.expect(try white.canAttack(black));
}
test "can attack on fourth diagonal" {
const white = try queen_attack.Queen.init(1, 7);
const black = try queen_attack.Queen.init(0, 6);
try testing.expect(try white.canAttack(black));
}
test "cannot attack if falling diagonals are only the same when reflected across the longest falling diagonal" {
const white = try queen_attack.Queen.init(4, 1);
const black = try queen_attack.Queen.init(2, 5);
try testing.expect(!try white.canAttack(black));
}
|
0 | repos/exercism-ziglang/queen-attack | repos/exercism-ziglang/queen-attack/.exercism/metadata.json | {"track":"zig","exercise":"queen-attack","id":"33e6a3bac84b4da3920ade5210d67a65","url":"https://exercism.org/tracks/zig/exercises/queen-attack","handle":"exilesprx","is_requester":true,"auto_approve":false} |
0 | repos/exercism-ziglang/queen-attack | repos/exercism-ziglang/queen-attack/.exercism/config.json | {
"authors": [
"massivelivefun"
],
"contributors": [
"ee7"
],
"files": {
"solution": [
"queen_attack.zig"
],
"test": [
"test_queen_attack.zig"
],
"example": [
".meta/example.zig"
]
},
"blurb": "Given the position of two queens on a chess board, indicate whether or not they are positioned so that they can attack each other.",
"source": "J Dalbey's Programming Practice problems",
"source_url": "https://users.csc.calpoly.edu/~jdalbey/103/Projects/ProgrammingPractice.html"
}
|
0 | repos/exercism-ziglang | repos/exercism-ziglang/leap/leap.zig | pub fn isLeapYear(year: u32) bool {
if (year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)) {
return true;
}
return false;
}
|
0 | repos/exercism-ziglang | repos/exercism-ziglang/leap/test_leap.zig | const std = @import("std");
const testing = std.testing;
const leap = @import("leap.zig");
test "year not divisible by 4 in common year" {
try testing.expect(!leap.isLeapYear(2015));
}
test "year divisible by 2, not divisible by 4 in common year" {
try testing.expect(!leap.isLeapYear(1970));
}
test "year divisible by 4, not divisible by 100 in leap year" {
try testing.expect(leap.isLeapYear(1996));
}
test "year divisible by 4 and 5 is still a leap year" {
try testing.expect(leap.isLeapYear(1960));
}
test "year divisible by 100, not divisible by 400 in common year" {
try testing.expect(!leap.isLeapYear(2100));
}
test "year divisible by 100 but not by 3 is still not a leap year" {
try testing.expect(!leap.isLeapYear(1900));
}
test "year divisible by 400 is leap year" {
try testing.expect(leap.isLeapYear(2000));
}
test "year divisible by 400 but not by 125 is still a leap year" {
try testing.expect(leap.isLeapYear(2400));
}
test "year divisible by 200, not divisible by 400 in common year" {
try testing.expect(!leap.isLeapYear(1800));
}
|
0 | repos/exercism-ziglang | repos/exercism-ziglang/leap/README.md | # Leap
Welcome to Leap on Exercism's Zig Track.
If you need help running the tests or submitting your code, check out `HELP.md`.
## Introduction
A leap year (in the Gregorian calendar) occurs:
- In every year that is evenly divisible by 4.
- Unless the year is evenly divisible by 100, in which case it's only a leap year if the year is also evenly divisible by 400.
Some examples:
- 1997 was not a leap year as it's not divisible by 4.
- 1900 was not a leap year as it's not divisible by 400.
- 2000 was a leap year!
~~~~exercism/note
For a delightful, four-minute explanation of the whole phenomenon of leap years, check out [this YouTube video](https://www.youtube.com/watch?v=xX96xng7sAE).
~~~~
## Instructions
Your task is to determine whether a given year is a leap year.
## Source
### Created by
- @massivelivefun
### Based on
CodeRanch Cattle Drive, Assignment 3 - https://coderanch.com/t/718816/Leap |
0 | repos/exercism-ziglang | repos/exercism-ziglang/leap/HELP.md | # Help
## Running the tests
Write your code in `<exercise_name>.zig`.
To run the tests for an exercise, run:
```bash
zig test test_exercise_name.zig
```
in the exercise's root directory (replacing `exercise_name` with the name of the exercise).
## Submitting your solution
You can submit your solution using the `exercism submit leap.zig` command.
This command will upload your solution to the Exercism website and print the solution page's URL.
It's possible to submit an incomplete solution which allows you to:
- See how others have completed the exercise
- Request help from a mentor
## Need to get help?
If you'd like help solving the exercise, check the following pages:
- The [Zig track's documentation](https://exercism.org/docs/tracks/zig)
- The [Zig track's programming category on the forum](https://forum.exercism.org/c/programming/zig)
- [Exercism's programming category on the forum](https://forum.exercism.org/c/programming/5)
- The [Frequently Asked Questions](https://exercism.org/docs/using/faqs)
Should those resources not suffice, you could submit your (incomplete) solution to request mentoring.
- [The Zig Programming Language Documentation][documentation] is a great overview of all of the language features that Zig provides to those who use it.
- [Zig Learn][zig-learn] is an excellent primer that explains the language features that Zig has to offer.
- [Ziglings][ziglings] is highly recommended.
Learn Zig by fixing tiny broken programs.
- [The Zig Programming Language Discord][discord-zig] is the main [Discord][discord].
It provides a great way to get in touch with the Zig community at large, and get some quick, direct help for any Zig related problem.
- [#zig][irc] on irc.freenode.net is the main Zig IRC channel.
- [/r/Zig][reddit] is the main Zig subreddit.
- [Stack Overflow][stack-overflow] can be used to discover code snippets and solutions to problems that may have already asked and maybe solved by others.
[discord]: https://discordapp.com
[discord-zig]: https://discord.com/invite/gxsFFjE
[documentation]: https://ziglang.org/documentation/master
[irc]: https://webchat.freenode.net/?channels=%23zig
[reddit]: https://www.reddit.com/r/Zig
[stack-overflow]: https://stackoverflow.com/questions/tagged/zig
[zig-learn]: https://ziglearn.org/
[ziglings]: https://github.com/ratfactor/ziglings |
0 | repos/exercism-ziglang/leap | repos/exercism-ziglang/leap/.exercism/metadata.json | {"track":"zig","exercise":"leap","id":"4144b02b93d24be6a1f031564fa232c3","url":"https://exercism.org/tracks/zig/exercises/leap","handle":"exilesprx","is_requester":true,"auto_approve":false} |
0 | repos/exercism-ziglang/leap | repos/exercism-ziglang/leap/.exercism/config.json | {
"authors": [
"massivelivefun"
],
"files": {
"solution": [
"leap.zig"
],
"test": [
"test_leap.zig"
],
"example": [
".meta/example.zig"
]
},
"blurb": "Determine whether a given year is a leap year.",
"source": "CodeRanch Cattle Drive, Assignment 3",
"source_url": "https://coderanch.com/t/718816/Leap"
}
|
0 | repos/exercism-ziglang | repos/exercism-ziglang/resistor-color/README.md | # Resistor Color
Welcome to Resistor Color on Exercism's Zig Track.
If you need help running the tests or submitting your code, check out `HELP.md`.
## Instructions
If you want to build something using a Raspberry Pi, you'll probably use _resistors_.
For this exercise, you need to know two things about them:
- Each resistor has a resistance value.
- Resistors are small - so small in fact that if you printed the resistance value on them, it would be hard to read.
To get around this problem, manufacturers print color-coded bands onto the resistors to denote their resistance values.
Each band has a position and a numeric value.
The first 2 bands of a resistor have a simple encoding scheme: each color maps to a single number.
In this exercise you are going to create a helpful program so that you don't have to remember the values of the bands.
These colors are encoded as follows:
- Black: 0
- Brown: 1
- Red: 2
- Orange: 3
- Yellow: 4
- Green: 5
- Blue: 6
- Violet: 7
- Grey: 8
- White: 9
The goal of this exercise is to create a way:
- to look up the numerical value associated with a particular color band
- to list the different band colors
Mnemonics map the colors to the numbers, that, when stored as an array, happen to map to their index in the array:
Better Be Right Or Your Great Big Values Go Wrong.
More information on the color encoding of resistors can be found in the [Electronic color code Wikipedia article][e-color-code].
[e-color-code]: https://en.wikipedia.org/wiki/Electronic_color_code
## Source
### Created by
- @massivelivefun
### Based on
Maud de Vries, Erik Schierboom - https://github.com/exercism/problem-specifications/issues/1458 |
0 | repos/exercism-ziglang | repos/exercism-ziglang/resistor-color/HELP.md | # Help
## Running the tests
Write your code in `<exercise_name>.zig`.
To run the tests for an exercise, run:
```bash
zig test test_exercise_name.zig
```
in the exercise's root directory (replacing `exercise_name` with the name of the exercise).
## Submitting your solution
You can submit your solution using the `exercism submit resistor_color.zig` command.
This command will upload your solution to the Exercism website and print the solution page's URL.
It's possible to submit an incomplete solution which allows you to:
- See how others have completed the exercise
- Request help from a mentor
## Need to get help?
If you'd like help solving the exercise, check the following pages:
- The [Zig track's documentation](https://exercism.org/docs/tracks/zig)
- The [Zig track's programming category on the forum](https://forum.exercism.org/c/programming/zig)
- [Exercism's programming category on the forum](https://forum.exercism.org/c/programming/5)
- The [Frequently Asked Questions](https://exercism.org/docs/using/faqs)
Should those resources not suffice, you could submit your (incomplete) solution to request mentoring.
- [The Zig Programming Language Documentation][documentation] is a great overview of all of the language features that Zig provides to those who use it.
- [Zig Learn][zig-learn] is an excellent primer that explains the language features that Zig has to offer.
- [Ziglings][ziglings] is highly recommended.
Learn Zig by fixing tiny broken programs.
- [The Zig Programming Language Discord][discord-zig] is the main [Discord][discord].
It provides a great way to get in touch with the Zig community at large, and get some quick, direct help for any Zig related problem.
- [#zig][irc] on irc.freenode.net is the main Zig IRC channel.
- [/r/Zig][reddit] is the main Zig subreddit.
- [Stack Overflow][stack-overflow] can be used to discover code snippets and solutions to problems that may have already asked and maybe solved by others.
[discord]: https://discordapp.com
[discord-zig]: https://discord.com/invite/gxsFFjE
[documentation]: https://ziglang.org/documentation/master
[irc]: https://webchat.freenode.net/?channels=%23zig
[reddit]: https://www.reddit.com/r/Zig
[stack-overflow]: https://stackoverflow.com/questions/tagged/zig
[zig-learn]: https://ziglearn.org/
[ziglings]: https://github.com/ratfactor/ziglings |
0 | repos/exercism-ziglang | repos/exercism-ziglang/resistor-color/resistor_color.zig | const std = @import("std");
pub const ColorBand = enum { black, brown, red, orange, yellow, green, blue, violet, grey, white };
pub fn colorCode(color: ColorBand) usize {
return @intFromEnum(color);
}
pub fn colors() []const ColorBand {
return std.enums.values(ColorBand);
}
|
0 | repos/exercism-ziglang | repos/exercism-ziglang/resistor-color/test_resistor_color.zig | const std = @import("std");
const testing = std.testing;
const resistor_color = @import("resistor_color.zig");
const ColorBand = resistor_color.ColorBand;
test "black" {
const expected: usize = 0;
const actual = resistor_color.colorCode(.black);
try testing.expectEqual(expected, actual);
}
test "white" {
const expected: usize = 9;
const actual = resistor_color.colorCode(.white);
try testing.expectEqual(expected, actual);
}
test "orange" {
const expected: usize = 3;
const actual = resistor_color.colorCode(.orange);
try testing.expectEqual(expected, actual);
}
test "colors" {
const expected = &[_]ColorBand{
.black, .brown, .red, .orange, .yellow,
.green, .blue, .violet, .grey, .white,
};
const actual = resistor_color.colors();
try testing.expectEqualSlices(ColorBand, expected, actual);
}
|
0 | repos/exercism-ziglang/resistor-color | repos/exercism-ziglang/resistor-color/.exercism/metadata.json | {"track":"zig","exercise":"resistor-color","id":"4e593928e98b40359cb5d7527075a0e4","url":"https://exercism.org/tracks/zig/exercises/resistor-color","handle":"exilesprx","is_requester":true,"auto_approve":false} |
0 | repos/exercism-ziglang/resistor-color | repos/exercism-ziglang/resistor-color/.exercism/config.json | {
"authors": [
"massivelivefun"
],
"files": {
"solution": [
"resistor_color.zig"
],
"test": [
"test_resistor_color.zig"
],
"example": [
".meta/example.zig"
]
},
"blurb": "Convert a resistor band's color to its numeric representation.",
"source": "Maud de Vries, Erik Schierboom",
"source_url": "https://github.com/exercism/problem-specifications/issues/1458"
}
|
0 | repos/exercism-ziglang | repos/exercism-ziglang/nucleotide-count/nucleotide_count.zig | pub const NucleotideError = error{Invalid};
pub const Counts = struct {
a: u32,
c: u32,
g: u32,
t: u32,
};
pub fn countNucleotides(s: []const u8) NucleotideError!Counts {
var counts = Counts{ .a = 0, .c = 0, .g = 0, .t = 0 };
for (s) |c| {
switch (c) {
'A' => counts.a += 1,
'C' => counts.c += 1,
'G' => counts.g += 1,
'T' => counts.t += 1,
else => return NucleotideError.Invalid,
}
}
return counts;
}
|
0 | repos/exercism-ziglang | repos/exercism-ziglang/nucleotide-count/test_nucleotide_count.zig | const std = @import("std");
const testing = std.testing;
const nucleotide_count = @import("nucleotide_count.zig");
const countNucleotides = nucleotide_count.countNucleotides;
test "empty strand" {
const actual = try countNucleotides("");
try testing.expectEqual(@as(u32, 0), actual.a);
try testing.expectEqual(@as(u32, 0), actual.c);
try testing.expectEqual(@as(u32, 0), actual.g);
try testing.expectEqual(@as(u32, 0), actual.t);
}
test "can count one nucleotide in single-character input" {
const actual = try countNucleotides("G");
try testing.expectEqual(@as(u32, 0), actual.a);
try testing.expectEqual(@as(u32, 0), actual.c);
try testing.expectEqual(@as(u32, 1), actual.g);
try testing.expectEqual(@as(u32, 0), actual.t);
}
test "strand with repeated nucleotide" {
const actual = try countNucleotides("GGGGGGG");
try testing.expectEqual(@as(u32, 0), actual.a);
try testing.expectEqual(@as(u32, 0), actual.c);
try testing.expectEqual(@as(u32, 7), actual.g);
try testing.expectEqual(@as(u32, 0), actual.t);
}
test "strand with multiple nucleotides" {
const actual = try countNucleotides("AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC");
try testing.expectEqual(@as(u32, 20), actual.a);
try testing.expectEqual(@as(u32, 12), actual.c);
try testing.expectEqual(@as(u32, 17), actual.g);
try testing.expectEqual(@as(u32, 21), actual.t);
}
test "strand with invalid nucleotides" {
const actual = countNucleotides("AGXXACT");
try testing.expectError(nucleotide_count.NucleotideError.Invalid, actual);
}
|
0 | repos/exercism-ziglang | repos/exercism-ziglang/nucleotide-count/README.md | # Nucleotide Count
Welcome to Nucleotide Count on Exercism's Zig Track.
If you need help running the tests or submitting your code, check out `HELP.md`.
## Instructions
Each of us inherits from our biological parents a set of chemical instructions known as DNA that influence how our bodies are constructed.
All known life depends on DNA!
> Note: You do not need to understand anything about nucleotides or DNA to complete this exercise.
DNA is a long chain of other chemicals and the most important are the four nucleotides, adenine, cytosine, guanine and thymine.
A single DNA chain can contain billions of these four nucleotides and the order in which they occur is important!
We call the order of these nucleotides in a bit of DNA a "DNA sequence".
We represent a DNA sequence as an ordered collection of these four nucleotides and a common way to do that is with a string of characters such as "ATTACG" for a DNA sequence of 6 nucleotides.
'A' for adenine, 'C' for cytosine, 'G' for guanine, and 'T' for thymine.
Given a string representing a DNA sequence, count how many of each nucleotide is present.
If the string contains characters that aren't A, C, G, or T then it is invalid and you should signal an error.
For example:
```text
"GATTACA" -> 'A': 3, 'C': 1, 'G': 1, 'T': 2
"INVALID" -> error
```
## Source
### Created by
- @ee7
### Based on
The Calculating DNA Nucleotides_problem at Rosalind - https://rosalind.info/problems/dna/ |
0 | repos/exercism-ziglang | repos/exercism-ziglang/nucleotide-count/HELP.md | # Help
## Running the tests
Write your code in `<exercise_name>.zig`.
To run the tests for an exercise, run:
```bash
zig test test_exercise_name.zig
```
in the exercise's root directory (replacing `exercise_name` with the name of the exercise).
## Submitting your solution
You can submit your solution using the `exercism submit nucleotide_count.zig` command.
This command will upload your solution to the Exercism website and print the solution page's URL.
It's possible to submit an incomplete solution which allows you to:
- See how others have completed the exercise
- Request help from a mentor
## Need to get help?
If you'd like help solving the exercise, check the following pages:
- The [Zig track's documentation](https://exercism.org/docs/tracks/zig)
- The [Zig track's programming category on the forum](https://forum.exercism.org/c/programming/zig)
- [Exercism's programming category on the forum](https://forum.exercism.org/c/programming/5)
- The [Frequently Asked Questions](https://exercism.org/docs/using/faqs)
Should those resources not suffice, you could submit your (incomplete) solution to request mentoring.
- [The Zig Programming Language Documentation][documentation] is a great overview of all of the language features that Zig provides to those who use it.
- [Zig Learn][zig-learn] is an excellent primer that explains the language features that Zig has to offer.
- [Ziglings][ziglings] is highly recommended.
Learn Zig by fixing tiny broken programs.
- [The Zig Programming Language Discord][discord-zig] is the main [Discord][discord].
It provides a great way to get in touch with the Zig community at large, and get some quick, direct help for any Zig related problem.
- [#zig][irc] on irc.freenode.net is the main Zig IRC channel.
- [/r/Zig][reddit] is the main Zig subreddit.
- [Stack Overflow][stack-overflow] can be used to discover code snippets and solutions to problems that may have already asked and maybe solved by others.
[discord]: https://discordapp.com
[discord-zig]: https://discord.com/invite/gxsFFjE
[documentation]: https://ziglang.org/documentation/master
[irc]: https://webchat.freenode.net/?channels=%23zig
[reddit]: https://www.reddit.com/r/Zig
[stack-overflow]: https://stackoverflow.com/questions/tagged/zig
[zig-learn]: https://ziglearn.org/
[ziglings]: https://codeberg.org/ziglings/exercises |
0 | repos/exercism-ziglang/nucleotide-count | repos/exercism-ziglang/nucleotide-count/.exercism/metadata.json | {"track":"zig","exercise":"nucleotide-count","id":"8650eec3aad74f3999f4ea4c772be7e2","url":"https://exercism.org/tracks/zig/exercises/nucleotide-count","handle":"exilesprx","is_requester":true,"auto_approve":false} |
0 | repos/exercism-ziglang/nucleotide-count | repos/exercism-ziglang/nucleotide-count/.exercism/config.json | {
"authors": [
"ee7"
],
"files": {
"solution": [
"nucleotide_count.zig"
],
"test": [
"test_nucleotide_count.zig"
],
"example": [
".meta/example.zig"
]
},
"blurb": "Given a DNA string, compute how many times each nucleotide occurs in the string.",
"source": "The Calculating DNA Nucleotides_problem at Rosalind",
"source_url": "https://rosalind.info/problems/dna/"
}
|
0 | repos/exercism-ziglang | repos/exercism-ziglang/scrabble-score/scrabble_score.zig | const std = @import("std");
const LetterValues = struct {
letters: []const u8,
value: u8,
pub fn contains(self: LetterValues, letter: u8) bool {
for (self.letters) |l| {
if (std.ascii.isAlphabetic(letter) and std.ascii.toUpper(letter) == l) {
return true;
}
}
return false;
}
};
const ones = LetterValues{ .letters = "AEIOULNRST", .value = 1 };
const twos = LetterValues{ .letters = "DG", .value = 2 };
const threes = LetterValues{ .letters = "BCMP", .value = 3 };
const fours = LetterValues{ .letters = "FHVWY", .value = 4 };
const fives = LetterValues{ .letters = "K", .value = 5 };
const eights = LetterValues{ .letters = "JX", .value = 8 };
const tens = LetterValues{ .letters = "QZ", .value = 10 };
const letters = [_]LetterValues{ ones, twos, threes, fours, fives, eights, tens };
pub fn score(s: []const u8) u32 {
var sum: u32 = 0;
for (s) |c| {
for (letters) |l| {
if (l.contains(c)) {
sum += l.value;
}
}
}
return sum;
}
|
0 | repos/exercism-ziglang | repos/exercism-ziglang/scrabble-score/test_scrabble_score.zig | const std = @import("std");
const testing = std.testing;
const score = @import("scrabble_score.zig").score;
test "lowercase letter" {
const expected: u32 = 1;
const actual = score("a");
try testing.expectEqual(expected, actual);
}
test "uppercase letter" {
const expected: u32 = 1;
const actual = score("A");
try testing.expectEqual(expected, actual);
}
test "valuable letter" {
const expected: u32 = 4;
const actual = score("f");
try testing.expectEqual(expected, actual);
}
test "short word" {
const expected: u32 = 2;
const actual = score("at");
try testing.expectEqual(expected, actual);
}
test "short, valuable word" {
const expected: u32 = 12;
const actual = score("zoo");
try testing.expectEqual(expected, actual);
}
test "medium word" {
const expected: u32 = 6;
const actual = score("street");
try testing.expectEqual(expected, actual);
}
test "medium, valuable word" {
const expected: u32 = 22;
const actual = score("quirky");
try testing.expectEqual(expected, actual);
}
test "long, mixed-case word" {
const expected: u32 = 41;
const actual = score("OxyphenButazone");
try testing.expectEqual(expected, actual);
}
test "english-like word" {
const expected: u32 = 8;
const actual = score("pinata");
try testing.expectEqual(expected, actual);
}
test "empty input" {
const expected: u32 = 0;
const actual = score("");
try testing.expectEqual(expected, actual);
}
test "entire alphabet available" {
const expected: u32 = 87;
const actual = score("abcdefghijklmnopqrstuvwxyz");
try testing.expectEqual(expected, actual);
}
|
0 | repos/exercism-ziglang | repos/exercism-ziglang/scrabble-score/README.md | # Scrabble Score
Welcome to Scrabble Score on Exercism's Zig Track.
If you need help running the tests or submitting your code, check out `HELP.md`.
## Instructions
Given a word, compute the Scrabble score for that word.
## Letter Values
You'll need these:
```text
Letter Value
A, E, I, O, U, L, N, R, S, T 1
D, G 2
B, C, M, P 3
F, H, V, W, Y 4
K 5
J, X 8
Q, Z 10
```
## Examples
"cabbage" should be scored as worth 14 points:
- 3 points for C
- 1 point for A, twice
- 3 points for B, twice
- 2 points for G
- 1 point for E
And to total:
- `3 + 2*1 + 2*3 + 2 + 1`
- = `3 + 2 + 6 + 3`
- = `5 + 9`
- = 14
## Extensions
- You can play a double or a triple letter.
- You can play a double or a triple word.
## Source
### Created by
- @ee7
### Based on
Inspired by the Extreme Startup game - https://github.com/rchatley/extreme_startup |
0 | repos/exercism-ziglang | repos/exercism-ziglang/scrabble-score/HELP.md | # Help
## Running the tests
Write your code in `<exercise_name>.zig`.
To run the tests for an exercise, run:
```bash
zig test test_exercise_name.zig
```
in the exercise's root directory (replacing `exercise_name` with the name of the exercise).
## Submitting your solution
You can submit your solution using the `exercism submit scrabble_score.zig` command.
This command will upload your solution to the Exercism website and print the solution page's URL.
It's possible to submit an incomplete solution which allows you to:
- See how others have completed the exercise
- Request help from a mentor
## Need to get help?
If you'd like help solving the exercise, check the following pages:
- The [Zig track's documentation](https://exercism.org/docs/tracks/zig)
- The [Zig track's programming category on the forum](https://forum.exercism.org/c/programming/zig)
- [Exercism's programming category on the forum](https://forum.exercism.org/c/programming/5)
- The [Frequently Asked Questions](https://exercism.org/docs/using/faqs)
Should those resources not suffice, you could submit your (incomplete) solution to request mentoring.
- [The Zig Programming Language Documentation][documentation] is a great overview of all of the language features that Zig provides to those who use it.
- [Zig Learn][zig-learn] is an excellent primer that explains the language features that Zig has to offer.
- [Ziglings][ziglings] is highly recommended.
Learn Zig by fixing tiny broken programs.
- [The Zig Programming Language Discord][discord-zig] is the main [Discord][discord].
It provides a great way to get in touch with the Zig community at large, and get some quick, direct help for any Zig related problem.
- [#zig][irc] on irc.freenode.net is the main Zig IRC channel.
- [/r/Zig][reddit] is the main Zig subreddit.
- [Stack Overflow][stack-overflow] can be used to discover code snippets and solutions to problems that may have already asked and maybe solved by others.
[discord]: https://discordapp.com
[discord-zig]: https://discord.com/invite/gxsFFjE
[documentation]: https://ziglang.org/documentation/master
[irc]: https://webchat.freenode.net/?channels=%23zig
[reddit]: https://www.reddit.com/r/Zig
[stack-overflow]: https://stackoverflow.com/questions/tagged/zig
[zig-learn]: https://ziglearn.org/
[ziglings]: https://github.com/ratfactor/ziglings |
0 | repos/exercism-ziglang/scrabble-score | repos/exercism-ziglang/scrabble-score/.exercism/metadata.json | {"track":"zig","exercise":"scrabble-score","id":"b900a736587a475889b3f69eac91ca91","url":"https://exercism.org/tracks/zig/exercises/scrabble-score","handle":"exilesprx","is_requester":true,"auto_approve":false} |
0 | repos/exercism-ziglang/scrabble-score | repos/exercism-ziglang/scrabble-score/.exercism/config.json | {
"authors": [
"ee7"
],
"files": {
"solution": [
"scrabble_score.zig"
],
"test": [
"test_scrabble_score.zig"
],
"example": [
".meta/example.zig"
]
},
"blurb": "Given a word, compute the Scrabble score for that word.",
"source": "Inspired by the Extreme Startup game",
"source_url": "https://github.com/rchatley/extreme_startup"
}
|
0 | repos/exercism-ziglang | repos/exercism-ziglang/isogram/test_isogram.zig | const std = @import("std");
const testing = std.testing;
const isogram = @import("isogram.zig");
test "empty string" {
try testing.expect(isogram.isIsogram(""));
}
test "isogram with only lower case characters" {
try testing.expect(isogram.isIsogram("isogram"));
}
test "word with one duplicated character" {
try testing.expect(!isogram.isIsogram("eleven"));
}
test "word with one duplicated character from the end of the alphabet" {
try testing.expect(!isogram.isIsogram("zzyzx"));
}
test "longest reported english isogram" {
try testing.expect(isogram.isIsogram("subdermatoglyphic"));
}
test "word with duplicated character in mixed case" {
try testing.expect(!isogram.isIsogram("Alphabet"));
}
test "word with duplicated character in mixed case, lowercase first" {
try testing.expect(!isogram.isIsogram("alphAbet"));
}
test "hypothetical isogrammic word with hyphen" {
try testing.expect(isogram.isIsogram("thumbscrew-japingly"));
}
test "hypothetical word with duplicated character following hyphen" {
try testing.expect(!isogram.isIsogram("thumbscrew-jappingly"));
}
test "isogram with duplicated hyphen" {
try testing.expect(isogram.isIsogram("six-year-old"));
}
test "made-up name that is an isogram" {
try testing.expect(isogram.isIsogram("Emily Jung Schwartzkopf"));
}
test "duplicated character in the middle" {
try testing.expect(!isogram.isIsogram("accentor"));
}
test "same first and last characters" {
try testing.expect(!isogram.isIsogram("angola"));
}
test "word with duplicated character and with two hyphens" {
try testing.expect(!isogram.isIsogram("up-to-date"));
}
|
0 | repos/exercism-ziglang | repos/exercism-ziglang/isogram/isogram.zig | const std = @import("std");
pub fn isIsogram(str: []const u8) bool {
// std.mem.zeroes([26]u8) is another way to initialize the array
var letters: [26]u8 = [_]u8{0} ** 26;
for (str) |c| {
if (!std.ascii.isAlphabetic(c)) {
continue;
}
letters[std.ascii.toLower(c) - 'a'] += 1;
if (letters[std.ascii.toLower(c) - 'a'] > 1) {
return false;
}
}
return true;
}
|
0 | repos/exercism-ziglang | repos/exercism-ziglang/isogram/README.md | # Isogram
Welcome to Isogram on Exercism's Zig Track.
If you need help running the tests or submitting your code, check out `HELP.md`.
## Instructions
Determine if a word or phrase is an isogram.
An isogram (also known as a "non-pattern word") is a word or phrase without a repeating letter, however spaces and hyphens are allowed to appear multiple times.
Examples of isograms:
- lumberjacks
- background
- downstream
- six-year-old
The word _isograms_, however, is not an isogram, because the s repeats.
## Source
### Created by
- @massivelivefun
### Based on
Wikipedia - https://en.wikipedia.org/wiki/Isogram |
0 | repos/exercism-ziglang | repos/exercism-ziglang/isogram/HELP.md | # Help
## Running the tests
Write your code in `<exercise_name>.zig`.
To run the tests for an exercise, run:
```bash
zig test test_exercise_name.zig
```
in the exercise's root directory (replacing `exercise_name` with the name of the exercise).
## Submitting your solution
You can submit your solution using the `exercism submit isogram.zig` command.
This command will upload your solution to the Exercism website and print the solution page's URL.
It's possible to submit an incomplete solution which allows you to:
- See how others have completed the exercise
- Request help from a mentor
## Need to get help?
If you'd like help solving the exercise, check the following pages:
- The [Zig track's documentation](https://exercism.org/docs/tracks/zig)
- The [Zig track's programming category on the forum](https://forum.exercism.org/c/programming/zig)
- [Exercism's programming category on the forum](https://forum.exercism.org/c/programming/5)
- The [Frequently Asked Questions](https://exercism.org/docs/using/faqs)
Should those resources not suffice, you could submit your (incomplete) solution to request mentoring.
- [The Zig Programming Language Documentation][documentation] is a great overview of all of the language features that Zig provides to those who use it.
- [Zig Learn][zig-learn] is an excellent primer that explains the language features that Zig has to offer.
- [Ziglings][ziglings] is highly recommended.
Learn Zig by fixing tiny broken programs.
- [The Zig Programming Language Discord][discord-zig] is the main [Discord][discord].
It provides a great way to get in touch with the Zig community at large, and get some quick, direct help for any Zig related problem.
- [#zig][irc] on irc.freenode.net is the main Zig IRC channel.
- [/r/Zig][reddit] is the main Zig subreddit.
- [Stack Overflow][stack-overflow] can be used to discover code snippets and solutions to problems that may have already asked and maybe solved by others.
[discord]: https://discordapp.com
[discord-zig]: https://discord.com/invite/gxsFFjE
[documentation]: https://ziglang.org/documentation/master
[irc]: https://webchat.freenode.net/?channels=%23zig
[reddit]: https://www.reddit.com/r/Zig
[stack-overflow]: https://stackoverflow.com/questions/tagged/zig
[zig-learn]: https://ziglearn.org/
[ziglings]: https://github.com/ratfactor/ziglings |
0 | repos/exercism-ziglang/isogram | repos/exercism-ziglang/isogram/.exercism/metadata.json | {"track":"zig","exercise":"isogram","id":"ff73d369e5534c53977d9b5e63d1ea15","url":"https://exercism.org/tracks/zig/exercises/isogram","handle":"exilesprx","is_requester":true,"auto_approve":false} |
0 | repos/exercism-ziglang/isogram | repos/exercism-ziglang/isogram/.exercism/config.json | {
"authors": [
"massivelivefun"
],
"files": {
"solution": [
"isogram.zig"
],
"test": [
"test_isogram.zig"
],
"example": [
".meta/example.zig"
]
},
"blurb": "Determine if a word or phrase is an isogram.",
"source": "Wikipedia",
"source_url": "https://en.wikipedia.org/wiki/Isogram"
}
|
0 | repos/exercism-ziglang | repos/exercism-ziglang/matching-brackets/test_matching_brackets.zig | const std = @import("std");
const testing = std.testing;
const isBalanced = @import("matching_brackets.zig").isBalanced;
test "paired square brackets" {
const actual = try isBalanced(testing.allocator, "[]");
try testing.expect(actual);
}
test "empty string" {
const actual = try isBalanced(testing.allocator, "");
try testing.expect(actual);
}
test "unpaired brackets" {
const actual = try isBalanced(testing.allocator, "[[");
try testing.expect(!actual);
}
test "wrong ordered brackets" {
const actual = try isBalanced(testing.allocator, "}{");
try testing.expect(!actual);
}
test "wrong closing bracket" {
const actual = try isBalanced(testing.allocator, "{]");
try testing.expect(!actual);
}
test "paired with whitespace" {
const actual = try isBalanced(testing.allocator, "{ }");
try testing.expect(actual);
}
test "partially paired brackets" {
const actual = try isBalanced(testing.allocator, "{[])");
try testing.expect(!actual);
}
test "simple nested brackets" {
const actual = try isBalanced(testing.allocator, "{[]}");
try testing.expect(actual);
}
test "several paired brackets" {
const actual = try isBalanced(testing.allocator, "{}[]");
try testing.expect(actual);
}
test "paired and nested brackets" {
const actual = try isBalanced(testing.allocator, "([{}({}[])])");
try testing.expect(actual);
}
test "unopened closing brackets" {
const actual = try isBalanced(testing.allocator, "{[)][]}");
try testing.expect(!actual);
}
test "unpaired and nested brackets" {
const actual = try isBalanced(testing.allocator, "([{])");
try testing.expect(!actual);
}
test "paired and wrong nested brackets" {
const actual = try isBalanced(testing.allocator, "[({]})");
try testing.expect(!actual);
}
test "paired and wrong nested brackets but innermost are correct" {
const actual = try isBalanced(testing.allocator, "[({}])");
try testing.expect(!actual);
}
test "paired and incomplete brackets" {
const actual = try isBalanced(testing.allocator, "{}[");
try testing.expect(!actual);
}
test "too many closing brackets" {
const actual = try isBalanced(testing.allocator, "[]]");
try testing.expect(!actual);
}
test "early unexpected brackets" {
const actual = try isBalanced(testing.allocator, ")()");
try testing.expect(!actual);
}
test "early mismatched brackets" {
const actual = try isBalanced(testing.allocator, "{)()");
try testing.expect(!actual);
}
test "math expression" {
const actual = try isBalanced(testing.allocator, "(((185 + 223.85) * 15) - 543)/2");
try testing.expect(actual);
}
test "complex latex expression" {
const s = "\\left(\\begin{array}{cc} \\frac{1}{3} & x\\\\ \\mathrm{e}^{x} &... x^2 \\end{array}\\right)";
const actual = try isBalanced(testing.allocator, s);
try testing.expect(actual);
}
test "maximum required level of nesting" {
const s = "(((_[[[_{{{_()_}}}_]]]_)))";
const actual = try isBalanced(testing.allocator, s);
try testing.expect(actual);
}
|
0 | repos/exercism-ziglang | repos/exercism-ziglang/matching-brackets/README.md | # Matching Brackets
Welcome to Matching Brackets on Exercism's Zig Track.
If you need help running the tests or submitting your code, check out `HELP.md`.
## Introduction
You're given the opportunity to write software for the Bracketeer™, an ancient but powerful mainframe.
The software that runs on it is written in a proprietary language.
Much of its syntax is familiar, but you notice _lots_ of brackets, braces and parentheses.
Despite the Bracketeer™ being powerful, it lacks flexibility.
If the source code has any unbalanced brackets, braces or parentheses, the Bracketeer™ crashes and must be rebooted.
To avoid such a scenario, you start writing code that can verify that brackets, braces, and parentheses are balanced before attempting to run it on the Bracketeer™.
## Instructions
Given a string containing brackets `[]`, braces `{}`, parentheses `()`, or any combination thereof, verify that any and all pairs are matched and nested correctly.
Any other characters should be ignored.
For example, `"{what is (42)}?"` is balanced and `"[text}"` is not.
## Constraints
You may assume that the input to `isBalanced` never contains more than 10 levels of nesting.
Feel free to solve this exercise without using the `allocator`, but note that the `isBalanced` function cannot return just `bool`, because the tests use `try`.
## Source
### Created by
- @ee7
### Based on
Ginna Baker |
0 | repos/exercism-ziglang | repos/exercism-ziglang/matching-brackets/HELP.md | # Help
## Running the tests
Write your code in `<exercise_name>.zig`.
To run the tests for an exercise, run:
```bash
zig test test_exercise_name.zig
```
in the exercise's root directory (replacing `exercise_name` with the name of the exercise).
## Submitting your solution
You can submit your solution using the `exercism submit matching_brackets.zig` command.
This command will upload your solution to the Exercism website and print the solution page's URL.
It's possible to submit an incomplete solution which allows you to:
- See how others have completed the exercise
- Request help from a mentor
## Need to get help?
If you'd like help solving the exercise, check the following pages:
- The [Zig track's documentation](https://exercism.org/docs/tracks/zig)
- The [Zig track's programming category on the forum](https://forum.exercism.org/c/programming/zig)
- [Exercism's programming category on the forum](https://forum.exercism.org/c/programming/5)
- The [Frequently Asked Questions](https://exercism.org/docs/using/faqs)
Should those resources not suffice, you could submit your (incomplete) solution to request mentoring.
- [The Zig Programming Language Documentation][documentation] is a great overview of all of the language features that Zig provides to those who use it.
- [Zig Guide][zig-guide] is an excellent primer that explains the language features that Zig has to offer.
- [Ziglings][ziglings] is highly recommended.
Learn Zig by fixing tiny broken programs.
- [The Zig Programming Language Discord][discord-zig] is the main [Discord][discord].
It provides a great way to get in touch with the Zig community at large, and get some quick, direct help for any Zig related problem.
- [#zig][irc] on irc.freenode.net is the main Zig IRC channel.
- [/r/Zig][reddit] is the main Zig subreddit.
- [Stack Overflow][stack-overflow] can be used to discover code snippets and solutions to problems that may have already asked and maybe solved by others.
[discord]: https://discordapp.com
[discord-zig]: https://discord.com/invite/gxsFFjE
[documentation]: https://ziglang.org/documentation/master
[irc]: https://webchat.freenode.net/?channels=%23zig
[reddit]: https://www.reddit.com/r/Zig
[stack-overflow]: https://stackoverflow.com/questions/tagged/zig
[zig-guide]: https://zig.guide/
[ziglings]: https://codeberg.org/ziglings/exercises |
0 | repos/exercism-ziglang | repos/exercism-ziglang/matching-brackets/matching_brackets.zig | const std = @import("std");
const mem = std.mem;
pub fn isBalanced(allocator: mem.Allocator, s: []const u8) !bool {
var array = std.ArrayList(u8).init(allocator);
defer array.deinit();
for (s) |c| {
switch (c) {
'[', '(', '{' => {
try array.append(c);
},
']', ')', '}' => {
// If the last element in the array is not the matching opening bracket, then we have a mismatch.
const last = array.getLastOrNull();
if (last != opening(c)) {
return false;
}
_ = array.popOrNull();
},
else => {
continue;
},
}
}
// If the array is empty, then all brackets were balanced.
return array.items.len == 0;
}
fn opening(c: u8) u8 {
switch (c) {
']' => return '[',
')' => return '(',
'}' => return '{',
else => unreachable,
}
}
|
0 | repos/exercism-ziglang/matching-brackets | repos/exercism-ziglang/matching-brackets/.exercism/metadata.json | {"track":"zig","exercise":"matching-brackets","id":"4ac9ccc78d9b4eb6932756637fbe97c4","url":"https://exercism.org/tracks/zig/exercises/matching-brackets","handle":"exilesprx","is_requester":true,"auto_approve":false} |
0 | repos/exercism-ziglang/matching-brackets | repos/exercism-ziglang/matching-brackets/.exercism/config.json | {
"authors": [
"ee7"
],
"files": {
"solution": [
"matching_brackets.zig"
],
"test": [
"test_matching_brackets.zig"
],
"example": [
".meta/example.zig"
]
},
"blurb": "Make sure the brackets and braces all match.",
"source": "Ginna Baker"
}
|
0 | repos/exercism-ziglang | repos/exercism-ziglang/space-age/test_space_age.zig | const std = @import("std");
const expectApproxEqAbs = std.testing.expectApproxEqAbs;
const space_age = @import("space_age.zig");
const Planet = space_age.Planet;
fn testAge(planet: Planet, seconds: usize, expected_age_in_earth_years: f64) !void {
const tolerance = 0.01;
const actual = planet.age(seconds);
try expectApproxEqAbs(expected_age_in_earth_years, actual, tolerance);
}
test "age on earth" {
try testAge(Planet.earth, 1_000_000_000, 31.69);
}
test "age on mercury" {
try testAge(Planet.mercury, 2_134_835_688, 280.88);
}
test "age on venus" {
try testAge(Planet.venus, 189_839_836, 9.78);
}
test "age on mars" {
try testAge(Planet.mars, 2_129_871_239, 35.88);
}
test "age on jupiter" {
try testAge(Planet.jupiter, 901_876_382, 2.41);
}
test "age on saturn" {
try testAge(Planet.saturn, 2_000_000_000, 2.15);
}
test "age on uranus" {
try testAge(Planet.uranus, 1_210_123_456, 0.46);
}
test "age on neptune" {
try testAge(Planet.neptune, 1_821_023_456, 0.35);
}
|
0 | repos/exercism-ziglang | repos/exercism-ziglang/space-age/space_age.zig | const std = @import("std");
const print = std.debug.print;
pub const Planet = enum {
mercury,
venus,
earth,
mars,
jupiter,
saturn,
uranus,
neptune,
pub fn age(self: Planet, seconds: usize) f64 {
const earthYears: f64 = switch (self) {
Planet.mercury => 0.2408467,
Planet.venus => 0.61519726,
Planet.earth => 1.0,
Planet.mars => 1.8808158,
Planet.jupiter => 11.862615,
Planet.saturn => 29.447498,
Planet.uranus => 84.016846,
Planet.neptune => 164.79132,
};
return @as(f64, @floatFromInt(seconds)) / (31557600.0 * earthYears);
}
};
|
0 | repos/exercism-ziglang | repos/exercism-ziglang/space-age/README.md | # Space Age
Welcome to Space Age on Exercism's Zig Track.
If you need help running the tests or submitting your code, check out `HELP.md`.
## Introduction
The year is 2525 and you've just embarked on a journey to visit all planets in the Solar System (Mercury, Venus, Earth, Mars, Jupiter, Saturn, Uranus and Neptune).
The first stop is Mercury, where customs require you to fill out a form (bureaucracy is apparently _not_ Earth-specific).
As you hand over the form to the customs officer, they scrutinize it and frown.
"Do you _really_ expect me to believe you're just 50 years old?
You must be closer to 200 years old!"
Amused, you wait for the customs officer to start laughing, but they appear to be dead serious.
You realize that you've entered your age in _Earth years_, but the officer expected it in _Mercury years_!
As Mercury's orbital period around the sun is significantly shorter than Earth, you're actually a lot older in Mercury years.
After some quick calculations, you're able to provide your age in Mercury Years.
The customs officer smiles, satisfied, and waves you through.
You make a mental note to pre-calculate your planet-specific age _before_ future customs checks, to avoid such mix-ups.
~~~~exercism/note
If you're wondering why Pluto didn't make the cut, go watch [this YouTube video][pluto-video].
[pluto-video]: https://www.youtube.com/watch?v=Z_2gbGXzFbs
~~~~
## Instructions
Given an age in seconds, calculate how old someone would be on a planet in our Solar System.
One Earth year equals 365.25 Earth days, or 31,557,600 seconds.
If you were told someone was 1,000,000,000 seconds old, their age would be 31.69 Earth-years.
For the other planets, you have to account for their orbital period in Earth Years:
| Planet | Orbital period in Earth Years |
| ------- | ----------------------------- |
| Mercury | 0.2408467 |
| Venus | 0.61519726 |
| Earth | 1.0 |
| Mars | 1.8808158 |
| Jupiter | 11.862615 |
| Saturn | 29.447498 |
| Uranus | 84.016846 |
| Neptune | 164.79132 |
~~~~exercism/note
The actual length of one complete orbit of the Earth around the sun is closer to 365.256 days (1 sidereal year).
The Gregorian calendar has, on average, 365.2425 days.
While not entirely accurate, 365.25 is the value used in this exercise.
See [Year on Wikipedia][year] for more ways to measure a year.
[year]: https://en.wikipedia.org/wiki/Year#Summary
~~~~
## Source
### Created by
- @massivelivefun
### Contributed to by
- @ee7
### Based on
Partially inspired by Chapter 1 in Chris Pine's online Learn to Program tutorial. - https://pine.fm/LearnToProgram/?Chapter=01 |
0 | repos/exercism-ziglang | repos/exercism-ziglang/space-age/HELP.md | # Help
## Running the tests
Write your code in `<exercise_name>.zig`.
To run the tests for an exercise, run:
```bash
zig test test_exercise_name.zig
```
in the exercise's root directory (replacing `exercise_name` with the name of the exercise).
## Submitting your solution
You can submit your solution using the `exercism submit space_age.zig` command.
This command will upload your solution to the Exercism website and print the solution page's URL.
It's possible to submit an incomplete solution which allows you to:
- See how others have completed the exercise
- Request help from a mentor
## Need to get help?
If you'd like help solving the exercise, check the following pages:
- The [Zig track's documentation](https://exercism.org/docs/tracks/zig)
- The [Zig track's programming category on the forum](https://forum.exercism.org/c/programming/zig)
- [Exercism's programming category on the forum](https://forum.exercism.org/c/programming/5)
- The [Frequently Asked Questions](https://exercism.org/docs/using/faqs)
Should those resources not suffice, you could submit your (incomplete) solution to request mentoring.
- [The Zig Programming Language Documentation][documentation] is a great overview of all of the language features that Zig provides to those who use it.
- [Zig Guide][zig-guide] is an excellent primer that explains the language features that Zig has to offer.
- [Ziglings][ziglings] is highly recommended.
Learn Zig by fixing tiny broken programs.
- [The Zig Programming Language Discord][discord-zig] is the main [Discord][discord].
It provides a great way to get in touch with the Zig community at large, and get some quick, direct help for any Zig related problem.
- [#zig][irc] on irc.freenode.net is the main Zig IRC channel.
- [/r/Zig][reddit] is the main Zig subreddit.
- [Stack Overflow][stack-overflow] can be used to discover code snippets and solutions to problems that may have already asked and maybe solved by others.
[discord]: https://discordapp.com
[discord-zig]: https://discord.com/invite/gxsFFjE
[documentation]: https://ziglang.org/documentation/master
[irc]: https://webchat.freenode.net/?channels=%23zig
[reddit]: https://www.reddit.com/r/Zig
[stack-overflow]: https://stackoverflow.com/questions/tagged/zig
[zig-guide]: https://zig.guide/
[ziglings]: https://codeberg.org/ziglings/exercises |
0 | repos/exercism-ziglang/space-age | repos/exercism-ziglang/space-age/.exercism/metadata.json | {"track":"zig","exercise":"space-age","id":"fdf310d46fa14a74b8743f7dfad56ebe","url":"https://exercism.org/tracks/zig/exercises/space-age","handle":"exilesprx","is_requester":true,"auto_approve":false} |
0 | repos/exercism-ziglang/space-age | repos/exercism-ziglang/space-age/.exercism/config.json | {
"authors": [
"massivelivefun"
],
"contributors": [
"ee7"
],
"files": {
"solution": [
"space_age.zig"
],
"test": [
"test_space_age.zig"
],
"example": [
".meta/example.zig"
]
},
"blurb": "Given an age in seconds, calculate how old someone is in terms of a given planet's solar years.",
"source": "Partially inspired by Chapter 1 in Chris Pine's online Learn to Program tutorial.",
"source_url": "https://pine.fm/LearnToProgram/?Chapter=01"
}
|
0 | repos/exercism-ziglang | repos/exercism-ziglang/triangle/README.md | # Triangle
Welcome to Triangle on Exercism's Zig Track.
If you need help running the tests or submitting your code, check out `HELP.md`.
## Instructions
Determine if a triangle is equilateral, isosceles, or scalene.
An _equilateral_ triangle has all three sides the same length.
An _isosceles_ triangle has at least two sides the same length.
(It is sometimes specified as having exactly two sides the same length, but for the purposes of this exercise we'll say at least two.)
A _scalene_ triangle has all sides of different lengths.
## Note
For a shape to be a triangle at all, all sides have to be of length > 0, and the sum of the lengths of any two sides must be greater than or equal to the length of the third side.
In equations:
Let `a`, `b`, and `c` be sides of the triangle.
Then all three of the following expressions must be true:
```text
a + b ≥ c
b + c ≥ a
a + c ≥ b
```
See [Triangle Inequality][triangle-inequality]
[triangle-inequality]: https://en.wikipedia.org/wiki/Triangle_inequality
## Source
### Created by
- @massivelivefun
### Based on
The Ruby Koans triangle project, parts 1 & 2 - https://web.archive.org/web/20220831105330/http://rubykoans.com |
0 | repos/exercism-ziglang | repos/exercism-ziglang/triangle/test_triangle.zig | const std = @import("std");
const testing = std.testing;
const triangle = @import("triangle.zig");
test "equilateral all sides are equal" {
const actual = try triangle.Triangle.init(2, 2, 2);
try testing.expect(actual.isEquilateral());
}
test "equilateral any side is unequal" {
const actual = try triangle.Triangle.init(2, 3, 2);
try testing.expect(!actual.isEquilateral());
}
test "equilateral no sides are equal" {
const actual = try triangle.Triangle.init(5, 4, 6);
try testing.expect(!actual.isEquilateral());
}
test "equilateral all zero sides is not a triangle" {
const actual = triangle.Triangle.init(0, 0, 0);
try testing.expectError(triangle.TriangleError.Invalid, actual);
}
test "equilateral sides may be floats" {
const actual = try triangle.Triangle.init(0.5, 0.5, 0.5);
try testing.expect(actual.isEquilateral());
}
test "isosceles last two sides are equal" {
const actual = try triangle.Triangle.init(3, 4, 4);
try testing.expect(actual.isIsosceles());
}
test "isosceles first two sides are equal" {
const actual = try triangle.Triangle.init(4, 4, 3);
try testing.expect(actual.isIsosceles());
}
test "isosceles first and last sides are equal" {
const actual = try triangle.Triangle.init(4, 3, 4);
try testing.expect(actual.isIsosceles());
}
test "equilateral triangles are also isosceles" {
const actual = try triangle.Triangle.init(4, 3, 4);
try testing.expect(actual.isIsosceles());
}
test "isosceles no sides are equal" {
const actual = try triangle.Triangle.init(2, 3, 4);
try testing.expect(!actual.isIsosceles());
}
test "isosceles first triangle inequality violation" {
const actual = triangle.Triangle.init(1, 1, 3);
try testing.expectError(triangle.TriangleError.Invalid, actual);
}
test "isosceles second triangle inequality violation" {
const actual = triangle.Triangle.init(1, 3, 1);
try testing.expectError(triangle.TriangleError.Invalid, actual);
}
test "isosceles third triangle inequality violation" {
const actual = triangle.Triangle.init(3, 1, 1);
try testing.expectError(triangle.TriangleError.Invalid, actual);
}
test "isosceles sides may be floats" {
const actual = try triangle.Triangle.init(0.5, 0.4, 0.5);
try testing.expect(actual.isIsosceles());
}
test "scalene no sides are equal" {
const actual = try triangle.Triangle.init(5, 4, 6);
try testing.expect(actual.isScalene());
}
test "scalene all sides are equal" {
const actual = try triangle.Triangle.init(4, 4, 4);
try testing.expect(!actual.isScalene());
}
test "scalene first and second sides are equal" {
const actual = try triangle.Triangle.init(4, 4, 3);
try testing.expect(!actual.isScalene());
}
test "scalene first and third sides are equal" {
const actual = try triangle.Triangle.init(3, 4, 3);
try testing.expect(!actual.isScalene());
}
test "scalene second and third sides are equal" {
const actual = try triangle.Triangle.init(4, 3, 3);
try testing.expect(!actual.isScalene());
}
test "scalene may not violate triangle inequality" {
const actual = triangle.Triangle.init(7, 3, 2);
try testing.expectError(triangle.TriangleError.Invalid, actual);
}
test "scalene sides may be floats" {
const actual = try triangle.Triangle.init(0.5, 0.4, 0.6);
try testing.expect(actual.isScalene());
}
|
0 | repos/exercism-ziglang | repos/exercism-ziglang/triangle/HELP.md | # Help
## Running the tests
Write your code in `<exercise_name>.zig`.
To run the tests for an exercise, run:
```bash
zig test test_exercise_name.zig
```
in the exercise's root directory (replacing `exercise_name` with the name of the exercise).
## Submitting your solution
You can submit your solution using the `exercism submit triangle.zig` command.
This command will upload your solution to the Exercism website and print the solution page's URL.
It's possible to submit an incomplete solution which allows you to:
- See how others have completed the exercise
- Request help from a mentor
## Need to get help?
If you'd like help solving the exercise, check the following pages:
- The [Zig track's documentation](https://exercism.org/docs/tracks/zig)
- The [Zig track's programming category on the forum](https://forum.exercism.org/c/programming/zig)
- [Exercism's programming category on the forum](https://forum.exercism.org/c/programming/5)
- The [Frequently Asked Questions](https://exercism.org/docs/using/faqs)
Should those resources not suffice, you could submit your (incomplete) solution to request mentoring.
- [The Zig Programming Language Documentation][documentation] is a great overview of all of the language features that Zig provides to those who use it.
- [Zig Learn][zig-learn] is an excellent primer that explains the language features that Zig has to offer.
- [Ziglings][ziglings] is highly recommended.
Learn Zig by fixing tiny broken programs.
- [The Zig Programming Language Discord][discord-zig] is the main [Discord][discord].
It provides a great way to get in touch with the Zig community at large, and get some quick, direct help for any Zig related problem.
- [#zig][irc] on irc.freenode.net is the main Zig IRC channel.
- [/r/Zig][reddit] is the main Zig subreddit.
- [Stack Overflow][stack-overflow] can be used to discover code snippets and solutions to problems that may have already asked and maybe solved by others.
[discord]: https://discordapp.com
[discord-zig]: https://discord.com/invite/gxsFFjE
[documentation]: https://ziglang.org/documentation/master
[irc]: https://webchat.freenode.net/?channels=%23zig
[reddit]: https://www.reddit.com/r/Zig
[stack-overflow]: https://stackoverflow.com/questions/tagged/zig
[zig-learn]: https://ziglearn.org/
[ziglings]: https://codeberg.org/ziglings/exercises |
0 | repos/exercism-ziglang | repos/exercism-ziglang/triangle/triangle.zig | pub const TriangleError = error{Invalid};
pub const Triangle = struct {
// This struct, as well as its fields and methods, needs to be implemented.
a: f64,
b: f64,
c: f64,
pub fn init(a: f64, b: f64, c: f64) TriangleError!Triangle {
if (a <= 0 or b <= 0 or c <= 0) {
return TriangleError.Invalid;
}
if (a + b < c or b + c < a or a + c < b) {
return TriangleError.Invalid;
}
return Triangle{ .a = a, .b = b, .c = c };
}
pub fn isEquilateral(self: Triangle) bool {
return self.a == self.b and self.b == self.c;
}
pub fn isIsosceles(self: Triangle) bool {
return self.a == self.b or self.b == self.c or self.a == self.c;
}
pub fn isScalene(self: Triangle) bool {
return self.a != self.b and self.b != self.c and self.a != self.c;
}
};
|
0 | repos/exercism-ziglang/triangle | repos/exercism-ziglang/triangle/.exercism/metadata.json | {"track":"zig","exercise":"triangle","id":"7e739fcfdc3a4788be811a1658f2d2c4","url":"https://exercism.org/tracks/zig/exercises/triangle","handle":"exilesprx","is_requester":true,"auto_approve":false} |
0 | repos/exercism-ziglang/triangle | repos/exercism-ziglang/triangle/.exercism/config.json | {
"authors": [
"massivelivefun"
],
"files": {
"solution": [
"triangle.zig"
],
"test": [
"test_triangle.zig"
],
"example": [
".meta/example.zig"
]
},
"blurb": "Determine if a triangle is equilateral, isosceles, or scalene.",
"source": "The Ruby Koans triangle project, parts 1 & 2",
"source_url": "https://web.archive.org/web/20220831105330/http://rubykoans.com"
}
|
0 | repos/exercism-ziglang | repos/exercism-ziglang/darts/test_darts.zig | const std = @import("std");
const testing = std.testing;
const darts = @import("darts.zig");
test "missed target" {
const expected: usize = 0;
const coordinate = darts.Coordinate.init(-9.0, 9.0);
const actual = coordinate.score();
try testing.expectEqual(expected, actual);
}
test "on the outer circle" {
const expected: usize = 1;
const coordinate = darts.Coordinate.init(0.0, 10.0);
const actual = coordinate.score();
try testing.expectEqual(expected, actual);
}
test "on the middle circle" {
const expected: usize = 5;
const coordinate = darts.Coordinate.init(-5.0, 0.0);
const actual = coordinate.score();
try testing.expectEqual(expected, actual);
}
test "on the inner circle" {
const expected: usize = 10;
const coordinate = darts.Coordinate.init(0.0, -1.0);
const actual = coordinate.score();
try testing.expectEqual(expected, actual);
}
test "exactly on center" {
const expected: usize = 10;
const coordinate = darts.Coordinate.init(0.0, 0.0);
const actual = coordinate.score();
try testing.expectEqual(expected, actual);
}
test "near the center" {
const expected: usize = 10;
const coordinate = darts.Coordinate.init(-0.1, -0.1);
const actual = coordinate.score();
try testing.expectEqual(expected, actual);
}
test "just within the inner circle" {
const expected: usize = 10;
const coordinate = darts.Coordinate.init(0.7, 0.7);
const actual = coordinate.score();
try testing.expectEqual(expected, actual);
}
test "just outside the inner circle" {
const expected: usize = 5;
const coordinate = darts.Coordinate.init(0.8, -0.8);
const actual = coordinate.score();
try testing.expectEqual(expected, actual);
}
test "just within the middle circle" {
const expected: usize = 5;
const coordinate = darts.Coordinate.init(3.5, -3.5);
const actual = coordinate.score();
try testing.expectEqual(expected, actual);
}
test "just outside the middle circle" {
const expected: usize = 1;
const coordinate = darts.Coordinate.init(-3.6, -3.6);
const actual = coordinate.score();
try testing.expectEqual(expected, actual);
}
test "just within the outer circle" {
const expected: usize = 1;
const coordinate = darts.Coordinate.init(-7.0, 7.0);
const actual = coordinate.score();
try testing.expectEqual(expected, actual);
}
test "just outside the outer circle" {
const expected: usize = 0;
const coordinate = darts.Coordinate.init(7.1, -7.1);
const actual = coordinate.score();
try testing.expectEqual(expected, actual);
}
test "asymmetric position between the inner and middle circles" {
const expected: usize = 5;
const coordinate = darts.Coordinate.init(0.5, -4.0);
const actual = coordinate.score();
try testing.expectEqual(expected, actual);
}
|
0 | repos/exercism-ziglang | repos/exercism-ziglang/darts/README.md | # Darts
Welcome to Darts on Exercism's Zig Track.
If you need help running the tests or submitting your code, check out `HELP.md`.
## Instructions
Calculate the points scored in a single toss of a Darts game.
[Darts][darts] is a game where players throw darts at a [target][darts-target].
In our particular instance of the game, the target rewards 4 different amounts of points, depending on where the dart lands:

- If the dart lands outside the target, player earns no points (0 points).
- If the dart lands in the outer circle of the target, player earns 1 point.
- If the dart lands in the middle circle of the target, player earns 5 points.
- If the dart lands in the inner circle of the target, player earns 10 points.
The outer circle has a radius of 10 units (this is equivalent to the total radius for the entire target), the middle circle a radius of 5 units, and the inner circle a radius of 1.
Of course, they are all centered at the same point — that is, the circles are [concentric][] defined by the coordinates (0, 0).
Given a point in the target (defined by its [Cartesian coordinates][cartesian-coordinates] `x` and `y`, where `x` and `y` are [real][real-numbers]), calculate the correct score earned by a dart landing at that point.
## Credit
The scoreboard image was created by [habere-et-dispertire][habere-et-dispertire] using [Inkscape][inkscape].
[darts]: https://en.wikipedia.org/wiki/Darts
[darts-target]: https://en.wikipedia.org/wiki/Darts#/media/File:Darts_in_a_dartboard.jpg
[concentric]: https://mathworld.wolfram.com/ConcentricCircles.html
[cartesian-coordinates]: https://www.mathsisfun.com/data/cartesian-coordinates.html
[real-numbers]: https://www.mathsisfun.com/numbers/real-numbers.html
[habere-et-dispertire]: https://exercism.org/profiles/habere-et-dispertire
[inkscape]: https://en.wikipedia.org/wiki/Inkscape
## Source
### Created by
- @massivelivefun
### Based on
Inspired by an exercise created by a professor Della Paolera in Argentina |
Subsets and Splits