• 【ZeroJudge】c122 Humble Numbers


    内容 :

    如果一個數字它的質因數只有2,3,5或7則我們稱這個數字為Humble number。下列數字代表前20個Humble numbers:1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 24, 25, 27,...

    输入说明 :

    輸入包含多個測試資料。每一個測試資料包含一個整數,1<= n <= 5842。當n=0時代表輸入結束。

    输出说明 :

    對每個測試資料必須輸出一行"The nth humble number is number."。對每個nth你必須依照n值不同輸出正確的序數"st", "nd", "rd", 或"th"。請參考sample output。

    范例输入 :help

     
    1
    2
    3
    4
    11
    12
    13
    21
    22
    23
    100
    1000
    5842
    0

    范例输出 :

    The 1st humble number is 1.
    The 2nd humble number is 2.
    The 3rd humble number is 3.
    The 4th humble number is 4.
    The 11th humble number is 12.
    The 12th humble number is 14.
    The 13th humble number is 15.
    The 21st humble number is 28.
    The 22nd humble number is 30.
    The 23rd humble number is 32.
    The 100th humble number is 450.
    The 1000th humble number is 385875.
    The 5842nd humble number is 2000000000.

    提示 :

    * Luck 貓翻譯

    出处 :

    ACM 443

    代码1 :

      1 // 以下程式碼由 sagit 所撰寫,學術使用可自由轉載,但請註明本站網址。
      2 // Sagit's ACM Code:  http://www3.tcgs.tc.edu.tw/~sagit/acm/
      3 
      4 #include <stdio.h>
      5 #include <stdlib.h>
      6 #define NUM 5842
      7 #define NUM_2 1200
      8 
      9 int Humble[NUM]={
     10 1,2,3,4,5,6,7,8,9,10,
     11 12,14,15,16,18,20,21,24,25,27,
     12 28,30,32,35,36,40,42,45,48,49,
     13 50,54,56,60,63,64,70,72,75,80,
     14 81,84,90,96,98,100,105,108,112,120,
     15 125,126,128,135,140,144,147,150,160,162,
     16 168,175,180,189,192,196,200,210,216,224,
     17 225,240,243,245,250,252,256,270,280,288,
     18 294,300,315,320,324,336,343,350,360,375,
     19 378,384,392,400,405,420,432,441,448,450,
     20 480,486,490,500,504,512,525,540,560,567,
     21 576,588,600,625,630,640,648,672,675,686,
     22 700,720,729,735,750,756,768,784,800,810,
     23 840,864,875,882,896,900,945,960,972,980,
     24 1000,1008,1024,1029,1050,1080,1120,1125,1134,1152,
     25 1176,1200,1215,1225,1250,1260,1280,1296,1323,1344,
     26 1350,1372,1400,1440,1458,1470,1500,1512,1536,1568,
     27 1575,1600,1620,1680,1701,1715,1728,1750,1764,1792,
     28 1800,1875,1890,1920,1944,1960,2000,2016,2025,2048,
     29 2058,2100,2160,2187,2205,2240,2250,2268,2304,2352,
     30 2400,2401,2430,2450,2500,2520,2560,2592,2625,2646,
     31 2688,2700,2744,2800,2835,2880,2916,2940,3000,3024,
     32 3072,3087,3125,3136,3150,3200,3240,3360,3375,3402,
     33 3430,3456,3500,3528,3584,3600,3645,3675,3750,3780,
     34 3840,3888,3920,3969,4000,4032,4050,4096,4116,4200,
     35 4320,4374,4375,4410,4480,4500,4536,4608,4704,4725,
     36 4800,4802,4860,4900,5000,5040,5103,5120,5145,5184,
     37 5250,5292,5376,5400,5488,5600,5625,5670,5760,5832,
     38 5880,6000,6048,6075,6125,6144,6174,6250,6272,6300,
     39 6400,6480,6561,6615,6720,6750,6804,6860,6912,7000,
     40 7056,7168,7200,7203,7290,7350,7500,7560,7680,7776,
     41 7840,7875,7938,8000,8064,8100,8192,8232,8400,8505,
     42 8575,8640,8748,8750,8820,8960,9000,9072,9216,9261,
     43 9375,9408,9450,9600,9604,9720,9800,10000,10080,10125,
     44 10206,10240,10290,10368,10500,10584,10752,10800,10935,10976,
     45 11025,11200,11250,11340,11520,11664,11760,11907,12000,12005,
     46 12096,12150,12250,12288,12348,12500,12544,12600,12800,12960,
     47 13122,13125,13230,13440,13500,13608,13720,13824,14000,14112,
     48 14175,14336,14400,14406,14580,14700,15000,15120,15309,15360,
     49 15435,15552,15625,15680,15750,15876,16000,16128,16200,16384,
     50 16464,16800,16807,16875,17010,17150,17280,17496,17500,17640,
     51 17920,18000,18144,18225,18375,18432,18522,18750,18816,18900,
     52 19200,19208,19440,19600,19683,19845,20000,20160,20250,20412,
     53 20480,20580,20736,21000,21168,21504,21600,21609,21870,21875,
     54 21952,22050,22400,22500,22680,23040,23328,23520,23625,23814,
     55 24000,24010,24192,24300,24500,24576,24696,25000,25088,25200,
     56 25515,25600,25725,25920,26244,26250,26460,26880,27000,27216,
     57 27440,27648,27783,28000,28125,28224,28350,28672,28800,28812,
     58 29160,29400,30000,30240,30375,30618,30625,30720,30870,31104,
     59 31250,31360,31500,31752,32000,32256,32400,32768,32805,32928,
     60 33075,33600,33614,33750,34020,34300,34560,34992,35000,35280,
     61 35721,35840,36000,36015,36288,36450,36750,36864,37044,37500,
     62 37632,37800,38400,38416,38880,39200,39366,39375,39690,40000,
     63 40320,40500,40824,40960,41160,41472,42000,42336,42525,42875,
     64 43008,43200,43218,43740,43750,43904,44100,44800,45000,45360,
     65 45927,46080,46305,46656,46875,47040,47250,47628,48000,48020,
     66 48384,48600,49000,49152,49392,50000,50176,50400,50421,50625,
     67 51030,51200,51450,51840,52488,52500,52920,53760,54000,54432,
     68 54675,54880,55125,55296,55566,56000,56250,56448,56700,57344,
     69 57600,57624,58320,58800,59049,59535,60000,60025,60480,60750,
     70 61236,61250,61440,61740,62208,62500,62720,63000,63504,64000,
     71 64512,64800,64827,65536,65610,65625,65856,66150,67200,67228,
     72 67500,68040,68600,69120,69984,70000,70560,70875,71442,71680,
     73 72000,72030,72576,72900,73500,73728,74088,75000,75264,75600,
     74 76545,76800,76832,77175,77760,78125,78400,78732,78750,79380,
     75 80000,80640,81000,81648,81920,82320,82944,83349,84000,84035,
     76 84375,84672,85050,85750,86016,86400,86436,87480,87500,87808,
     77 88200,89600,90000,90720,91125,91854,91875,92160,92610,93312,
     78 93750,94080,94500,95256,96000,96040,96768,97200,98000,98304,
     79 98415,98784,99225,100000,100352,100800,100842,101250,102060,102400,
     80 102900,103680,104976,105000,105840,107163,107520,108000,108045,108864,
     81 109350,109375,109760,110250,110592,111132,112000,112500,112896,113400,
     82 114688,115200,115248,116640,117600,117649,118098,118125,119070,120000,
     83 120050,120960,121500,122472,122500,122880,123480,124416,125000,125440,
     84 126000,127008,127575,128000,128625,129024,129600,129654,131072,131220,
     85 131250,131712,132300,134400,134456,135000,136080,137200,137781,138240,
     86 138915,139968,140000,140625,141120,141750,142884,143360,144000,144060,
     87 145152,145800,147000,147456,148176,150000,150528,151200,151263,151875,
     88 153090,153125,153600,153664,154350,155520,156250,156800,157464,157500,
     89 158760,160000,161280,162000,163296,163840,164025,164640,165375,165888,
     90 166698,168000,168070,168750,169344,170100,171500,172032,172800,172872,
     91 174960,175000,175616,176400,177147,178605,179200,180000,180075,181440,
     92 182250,183708,183750,184320,185220,186624,187500,188160,189000,190512,
     93 192000,192080,193536,194400,194481,196000,196608,196830,196875,197568,
     94 198450,200000,200704,201600,201684,202500,204120,204800,205800,207360,
     95 209952,210000,211680,212625,214326,214375,215040,216000,216090,217728,
     96 218700,218750,219520,220500,221184,222264,224000,225000,225792,226800,
     97 229376,229635,230400,230496,231525,233280,234375,235200,235298,236196,
     98 236250,238140,240000,240100,241920,243000,244944,245000,245760,246960,
     99 248832,250000,250047,250880,252000,252105,253125,254016,255150,256000,
    100 257250,258048,259200,259308,262144,262440,262500,263424,264600,268800,
    101 268912,270000,272160,273375,274400,275562,275625,276480,277830,279936,
    102 280000,281250,282240,283500,285768,286720,288000,288120,290304,291600,
    103 294000,294912,295245,296352,297675,300000,300125,301056,302400,302526,
    104 303750,306180,306250,307200,307328,308700,311040,312500,313600,314928,
    105 315000,317520,320000,321489,322560,324000,324135,326592,327680,328050,
    106 328125,329280,330750,331776,333396,336000,336140,337500,338688,340200,
    107 343000,344064,345600,345744,349920,350000,351232,352800,352947,354294,
    108 354375,357210,358400,360000,360150,362880,364500,367416,367500,368640,
    109 370440,373248,375000,376320,378000,381024,382725,384000,384160,385875,
    110 387072,388800,388962,390625,392000,393216,393660,393750,395136,396900,
    111 400000,401408,403200,403368,405000,408240,409600,411600,413343,414720,
    112 416745,419904,420000,420175,421875,423360,425250,428652,428750,430080,
    113 432000,432180,435456,437400,437500,439040,441000,442368,444528,448000,
    114 450000,451584,453600,453789,455625,458752,459270,459375,460800,460992,
    115 463050,466560,468750,470400,470596,472392,472500,476280,480000,480200,
    116 483840,486000,489888,490000,491520,492075,493920,496125,497664,500000,
    117 500094,501760,504000,504210,506250,508032,510300,512000,514500,516096,
    118 518400,518616,524288,524880,525000,526848,529200,531441,535815,537600,
    119 537824,540000,540225,544320,546750,546875,548800,551124,551250,552960,
    120 555660,559872,560000,562500,564480,567000,571536,573440,576000,576240,
    121 580608,583200,583443,588000,588245,589824,590490,590625,592704,595350,
    122 600000,600250,602112,604800,605052,607500,612360,612500,614400,614656,
    123 617400,622080,625000,627200,629856,630000,635040,637875,640000,642978,
    124 643125,645120,648000,648270,653184,655360,656100,656250,658560,661500,
    125 663552,666792,672000,672280,675000,677376,680400,686000,688128,688905,
    126 691200,691488,694575,699840,700000,702464,703125,705600,705894,708588,
    127 708750,714420,716800,720000,720300,725760,729000,734832,735000,737280,
    128 740880,746496,750000,750141,752640,756000,756315,759375,762048,765450,
    129 765625,768000,768320,771750,774144,777600,777924,781250,784000,786432,
    130 888,180,2772,3528,6200,2816,3584,336,3264,6480,
    131 2720,925,3075,343,3143,189,2565,4050,6318,192,
    132 350,3400,2970,3780,6804,196,2660,3840,360,6552,
    133 3888,200,3080,3920,2736,999,3321,3969,2975,4000,
    134 375,2793,4032,378,3672,6254,1036,210,2850,384,
    135 4116,7020,4380,3300,392,3592,216,7560,7440,400,
    136 4067,3213,4320,405,7371,224,3040,1110,225,3465,
    137 4410,3078,4672,188,3332,4480,420,4080,3564,4536,
    138 3400,5000,3192,4608,432,11344,1184,240,3696,4704,
    139 441,4041,243,8505,245,3325,448,4352,450,8190,
    140 4860,250,3850,4648,252,3420,5400,8424,256,5000,
    141 3960,5040,9072,3808,1295,3825,480,5145,3591,5184,
    142 486,4989,4125,490,3158,1332,270,4158,5292,9300,
    143 500,3724,5376,504,4896,9720,280,3800,512,5488,
    144 5229,4131,5840,235,4165,5312,288,525,5100,4455,
    145 5670,4250,5956,294,3990,5760,540,9828,4352,1480,
    146 300,4620,5880,4104,6480,10416,560,5440,4752,6048,
    147 567,5508,5125,4256,1554,315,4275,576,6174,10530,
    148 320,4928,1322,4950,588,5388,324,11340,4760,6400,
    149 600,10920,6480,11664,336,4560,1665,5535,6615,4617,
    150 7008,282,343,4655,6720,630,6120,5346,6804,350,
    151 4750,640,6860,4788,6912,648,6652,5500,4864,1776,
    152 360,5544,7056,6723,5677,5632,1813,5355,672,6528,
    153 675,12285,5440,1850,375,5775,686,6286,378,5130,
    154 8100,12636,384,700,6800,5940,7560,13608,392,5320,
    155 7680,720,13104,7776,400,329,5831,7840,735,4737,
    156 1998,405,6237,7938,5950,8000,750,5586,8064,756,
    157 7344,12508,2072,420,5700,768,8232,14040,8760,6600,
    158 784,7184,432,15120,8505,6375,800,8134,441,5985,
    159 8640,810,8315,6427,448,6080,2220,450,6930,8820,
    160 6156,9344,376,6664,8960,840,8160,7128,9072,6800,
    161 10000,6384,2331,6885,864,9261,13427,2368,480,875,
    162 6517,1983,7425,882,8082,486,17010,490,6650,896,
    163 8704,900,16380,9720,500,7700,9296,504,6840,10800,
    164 16848,512,10000,423,7497,10080,945,9180,8019,7616,
    165 2590,525,7125,960,10290,7182,10368,972,9978,8250,
    166 980,6316,2664,540,8316,10584,18600,1000,7448,10752,
    167 1008,9792,19440,560,7600,1024,1751,9225,1029,9429,
    168 567,7695,11680,470,8330,10624,576,1050,10200,8910,
    169 11340,8500,11912,588,7980,11520,1080,19656,8704,2960,
    170 600,9240,11760,8208,2997,9963,11907,8925,1120,10880,
    171 1125,8379,12096,1134,11016,625,9625,8512,3108,630,
    172 8550,1152,12348,21060,640,9856,2644,9900,1176,10776,
    173 648,22680,9520,12800,1200,12201,9639,12960,1215,22113,
    174 672,1225,7895,3330,675,10395,13230,9234,14016,564,
    175 686,9310,13440,1260,12240,10692,13608,700,9500,1280,
    176 13720,9576,13824,1296,13304,11000,9728,3552,720,11088,
    177 14112,1323,12123,729,10625,11264,3626,735,9975,1344,
    178 13056,1350,24570,10880,3700,750,11550,1372,12572,756,
    179 10260,16200,25272,768,1400,13600,11880,15120,27216,784,
    180 10640,3885,11475,1440,15435,10773,15552,800,658,11662,
    181 3305,12375,1470,9474,3996,810,12474,15876,11900,16000,
    182 1500,11172,16128,1512,14688,25016,4144,840,11400,1536,
    183 16464,15687,12393,17520,705,12495,1568,14368,864,1575,
    184 15300,13365,17010,875,11875,1600,16268,882,11970,17280,
    185 1620,16630,12854,896,12160,4440,900,13860,17640,12312,
    186 18688,752,13328,17920,1680,16320,14256,18144,1701,11899,
    187 4625,15375,1715,11053,4662,945,12825,1728,18522,26854,
    188 4736,960,1750,13034,3966,14850,1764,16164,972,34020,
    189 980,13300,1792,17408,1800,32760,19440,1000,15400,18592,
    190 1008,13680,4995,16605,19845,13851,1024,20000,846,1029,
    191 13965,20160,1890,18360,16038,15232,5180,1050,14250,1920,
    192 20580,14364,20736,1944,19956,16500,1960,12632,5328,1080,
    193 16632,21168,20169,17031,2000,14896,5439,16065,2016,19584,
    194 2025,36855,1120,15200,2048,3502,1125,17325,2058,18858,
    195 1134,15390,23360,940,16660,21248,1152,2100,20400,17820,
    196 22680,17000,23824,1176,15960,23040,2160,39312,17408,5920,
    197 1200,987,17493,23520,2205,14211,5994,1215,18711,23814,
    198 1225,16625,2240,21760,2250,16758,24192,2268,22032,1250,
    199 19250,17024,6216,1260,17100,2304,24696,42120,1280,19712,
    200 5288,19800,2352,21552,1296,45360,19040,6475,19125,2400,
    201 2401,22001,1323,17955,25920,2430,24945,19281,1344,2450,
    202 15790,6660,1350,20790,26460,18468,28032,1128,1372,18620,
    203 26880,2520,24480,21384,27216,1400,19000,2560,27440,19152,
    204 6993,20655,2592,26608,1175,20825,19456,7104,1440,2625,
    205 19551,5949,22275,2646,24246,1458,21250,22528,7252,1470,
    206 19950,2688,26112,2700,49140,21760,7400,1500,23100,2744,
    207 25144,1512,20520,32400,50544,1536,2800,27200,1269,22491,
    208 30240,2835,27540,24057,1568,21280,7770,1575,21375,2880,
    209 30870,21546,31104,1600,1316,23324,6610,24750,2940,18948,
    210 7992,1620,24948,31752,23800,32000,3000,22344,32256,3024,
    211 29376,50032,8288,1680,22800,3072,5253,27675,3087,28287,
    212 1701,23085,35040,1410,1715,23275,3136,28736,1728,3150,
    213 30600,26730,34020,1750,23750,3200,32536,1764,23940,34560,
    214 3240,33260,25708,1792,24320,8880,1800,27720,35280,24624,
    215 8991,28385,1504,26656,9065,26775,3360,32640,3375,25137,
    216 36288,3402,23798,9250,1875,28875,3430,22106,9324,1890,
    217 25650,3456,37044,53708,9472,1920,3500,26068,7932,29700,
    218 3528,32328,1944,68040,1960,26600,3584,34816,3600,36603,
    219 28917,38880,2000,1645,29155,37184,2016,3675,23685,9990,
    220 2025,31185,39690,27702,2048,40000,1692,2058,27930,40320,
    221 3780,36720,32076,30464,10360,2100,28500,3840,41160,28728,
    222 41472,3888,39912,33000,3920,25264,10656,2160,33264,42336,
    223 3969,36369,2187,31875,4000,29792,10878,2205,29925,4032,
    224 39168,4050,41575,32135,2240,30400,4096,7004,2250,34650,
    225 4116,37716,2268,30780,46720,1880,33320,42496,2304,4200,
    226 40800,35640,45360,34000,47648,2352,31920,11655,34425,4320,
    227 46305,32319,34816,11840,2400,1974,2401,32585,9915,37125,
    228 4410,28422,11988,2430,37422,47628,2450,33250,4480,43520,
    229 4500,33516,48384,4536,44064,2500,38500,34048,12432,2520,
    230 34200,4608,49392,47061,37179,2560,39424,10576,2115,37485,
    231 4704,43104,2592,4725,45900,40095,38080,12950,2625,35625,
    232 4800,4802,44002,2646,35910,51840,4860,49890,38562,2688,
    233 4900,31580,13320,2700,41580,52920,36936,56064,2256,2744,
    234 37240,53760,5040,48960,42768,54432,2800,2303,35697,5120,
    235 8755,46125,5145,33159,13986,2835,38475,5184,53216,2350,
    236 41650,38912,14208,2880,5250,39102,11898,44550,5292,48492,
    237 2916,42500,45056,14504,2940,39900,5376,52224,5400,98280,
    238 43520,14800,3000,46200,5488,50288,3024,41040,14985,49815,
    239 59535,41553,3072,5600,54400,2538,3087,41895,60480,5670,
    240 55080,3125,44989,3136,42560,15540,3150,42750,5760,61740,
    241 43092,62208,3200,2632,46648,13220,49500,5880,37896,15984,
    242 3240,49896,63504,47600,12907,51093,6000,44688,16317,48195,
    243 6048,58752,6075,93989,16576,3360,6125,39475,6144,10506,
    244 3375,51975,6174,56574,3402,46170,70080,2820,3430,46550,
    245 6272,57472,3456,6300,61200,53460,68040,3500,47500,6400,
    246 65072,3528,47880,69120,6480,66520,51416,3584,48640,17760,
    247 3600,2961,52479,70560,6615,42633,17982,3645,53125,3008,
    248 53312,18130,3675,49875,6720,65280,6750,50274,72576,6804,
    249 47596,18500,3750,57750,6860,44212,18648,3780,51300,6912,
    250 74088,107416,18944,3840,7000,52136,15864,59400,7056,64656,
    251 3888,136080,3920,53200,7168,12257,57375,7200,7203,66003,
    252 3969,53865,77760,4000,3290,58310,16525,57843,4032,7350,
    253 47370,19980,4050,62370,79380,55404,4096,80000,3384,4116,
    254 55860,80640,7560,73440,64152,60928,20720,4200,57000,7680,
    255 82320,57456,20979,61965,7776,79824,3525,62475,7840,50528,
    256 21312,4320,7875,58653,17847,66825,7938,72738,4374,4375,
    257 59375,8000,59584,21756,4410,59850,8064,78336,8100,83150,
    258 64270,4480,60800,8192,14008,4500,69300,8232,75432,4536,
    259 61560,93440,3760,66640,84992,4608,8400,81600,3807,67473,
    260 90720,8505,59495,23125,72171,4704,8575,55265,23310,4725,
    261 64125,8640,92610,64638,69632,23680,4800,3948,4802,65170,
    262 19830,74250,8820,56844,23976,4860,74844,95256,4900,66500,
    263 8960,87040,9000,67032,96768,9072,88128,5000,77000,68096,
    264 24864,5040,68400,9216,15759,83025,9261,84861,5103,69255,
    265 5120,78848,21152,4230,5145,69825,9408,86208,5184,9450,
    266 91800,80190,76160,25900,5250,71250,9600,9604,88004,5292,
    267 71820,103680,9720,99780,77124,5376,9800,63160,26640,5400,
    268 83160,105840,73872,26973,85155,4512,5488,74480,27195,80325,
    269 10080,97920,10125,75411,108864,5600,4606,71394,10240,17510,
    270 5625,86625,10290,66318,27972,5670,76950,10368,106432,4700,
    271 83300,77824,28416,5760,10500,78204,23796,89100,10584,96984,
    272 5832,85000,90112,29008,5880,79800,10752,104448,10800,109809,
    273 86751,87040,29600,6000,4935,87465,10976,100576,6048,11025,
    274 71055,29970,6075,93555,119070,6125,76981,6144,11200,108800,
    275 5076,6174,83790,120960,11340,110160,6250,89978,6272,85120,
    276 31080,6300,85500,11520,123480,86184,124416,6400,5264,93296,
    277 26440,99000,11760,75792,31968,6480,99792,127008,11907,83293,
    278 25814,6561,95625,12000,12005,77371,32634,6615,89775,12096,
    279 117504,12150,124725,63253,33152,6720,12250,78950,12288,21012,
    280 6750,103950,12348,113148,6804,92340,140160,5640,6860,93100,
    281 12544,114944,6912,12600,122400,106920,136080,7000,95000,12800,
    282 130144,7056,95760,34965,103275,12960,133040,5875,96957,7168,
    283 97280,35520,7200,5922,7203,97755,29745,111375,13230,85266,
    284 35964,7290,106250,6016,106624,36260,7350,99750,13440,130560,
    285 13500,100548,145152,13608,95192,37000,7500,115500,13720,88424,
    286 37296,7560,102600,13824,148176,141183,73649,37888,7680,14000,
    287 104272,31728,6345,112455,14112,129312,7776,14175,137700,120285,
    288 7840,106400,14336,24514,7875,106875,14400,14406,132006,7938,
    289 107730,155520,8000,6580,116620,33050,115686,8064,14700,94740,
    290 39960,8100,124740,158760,110808,8192,160000,6768,8232,111720,
    291 161280,15120,146880,128304,121856,41440,8400,6909,107091,15360,
    292 26265,138375,15435,99477,41958,8505,115425,15552,159648,7050,
    293 8575,116375,15680,101056,42624,8640,15750,117306,35694,133650,
    294 15876,145476,8748,8750,118750,16000,119168,43512,8820,119700,
    295 16128,156672,16200,166300,128540,8960,121600,16384,28016,9000,
    296 138600,16464,150864,9072,123120,44955,141925,7520,133280,45325,
    297 124659,9216,16800,16807,146393,7614,9261,125685,181440,17010,
    298 118990,46250,9375,134967,9408,17150,110530,46620,9450,128250,
    299 17280,185220,129276,139264,47360,9600,7896,9604,130340,39660,
    300 148500,17640,113688,47952,9720,149688,190512,9800,133000,17920,
    301 20801,153279,18000,134064,48951,144585,18144,176256,10000,8225,
    302 145775,136192,49728,10080,18375,118425,18432,31518,10125,155925,
    303 18522,169722,10206,138510,10240,157696,42304,8460,10290,139650,
    304 18816,172416,10368,18900,183600,160380,152320,51800,10500,142500,
    305 19200,19208,176008,10584,143640,207360,19440,199560,154248,10752,
    306 19600,126320,53280,10800,8883,157437,211680,19845,127899,53946,
    307 10935,159375,9024,10976,148960,54390,11025,149625,20160,195840,
    308 20250,150822,57053,160675,11200,9212,142788,20480,35020,11250,
    309 173250,20580,132636,55944,11340,153900,20736,212864,9400,166600,
    310 155648,56832,11520,21000,156408,47592,178200,21168,193968,11664,
    311 170000,180224,58016,11760,159600,21504,36771,172125,21600,21609,
    312 198009,11907,161595,174080,59200,12000,9870,12005,162925,21952,
    313 27623,173529,12096,22050,142110,59940,12150,187110,238140,12250,
    314 153962,12288,22400,217600,10152,12348,167580,241920,22680,220320,
    315 12500,179956,12544,170240,62160,12600,171000,23040,246960,172368,
    316 62937,185895,12800,10528,186592,52880,10575,187425,23520,151584,
    317 63936,12960,23625,175959,53541,200475,23814,166586,51628,13122,
    318 13125,178125,24000,24010,154742,65268,13230,179550,24192,235008,
    319 24300,249450,126506,66304,13440,24500,157900,24576,42024,13500,
    320 207900,24696,226296,13608,184680,280320,11280,13720,186200,25088,
    321 229888,13824,25200,244800,11421,202419,272160,14000,11515,178485,
    322 25600,43775,216513,14112,25725,165795,69930,14175,192375,25920,
    323 266080,11750,193914,14336,194560,71040,14400,11844,14406,195510,
    324 59490,222750,26460,170532,71928,14580,212500,12032,213248,72520,
    325 14700,199500,26880,261120,27000,201096,290304,27216,190384,74000,
    326 15000,231000,27440,176848,74592,15120,205200,27648,47277,249075,
    327 27783,254583,15309,131989,75776,15360,28000,208544,63456,12690,
    328 15435,209475,28224,258624,15552,28350,275400,15625,224945,15680,
    329 212800,28672,49028,15750,213750,28800,28812,264012,15876,215460,
    330 311040,16000,13160,233240,66100,231372,16128,29400,189480,79920,
    331 16200,249480,317520,221616,16384,64535,255465,13536,16464,223440,
    332 81585,240975,30240,293760,30375,226233,243712,82880,16800,13818,
    333 16807,197375,30720,52530,16875,259875,30870,198954,83916,17010,
    334 230850,31104,319296,14100,17150,232750,31360,202112,85248,17280,
    335 31500,234612,71388,267300,31752,290952,17496,17500,237500,32000,
    336 238336,87024,17640,239400,32256,313344,32400,329427,3173,257080,
    337 17920,243200,32768,56032,18000,14805,262395,32928,301728,18144,
    338 33075,213165,89910,18225,265625,15040,266560,90650,18375,230943,
    339 18432,33600,33614,292786,15228,18522,251370,362880,34020,237980,
    340 92500,18750,269934,18816,34300,221060,93240,18900,256500,34560,
    341 370440,258552,278528,94720,19200,15792,19208,260680,79320,297000,
    342 35280,227376,95904,19440,299376,381024,19600,16121,249879,35840,
    343 41602,19683,286875,36000,36015,232113,97902,19845,269325,36288,
    344 352512,20000,16450,291550,82625,189759,99456,20160,36750,236850,
    345 36864,63036,20250,311850,37044,339444,20412,277020,20480,315392,
    346 84608,16920,20580,279300,37632,344832,20736,37800,367200,320760,
    347 304640,103600,21000,285000,38400,38416,352016,21168,287280,104895,
    348 309825,38880,399120,17625,290871,21504,39200,252640,106560,21600,
    349 17766,21609,293265,89235,334125,39690,255798,107892,21870,21875,
    350 296875,18048,21952,297920,108780,22050,299250,40320,391680,40500,
    351 301644,114106,321350,22400,18424,285576,40960,70040,22500,346500,
    352 41160,265272,111888,22680,307800,41472,425728,18800,333200,90349,
    353 220947,113664,23040,42000,312816,95184,19035,337365,42336,387936,
    354 23328,42525,297475,115625,244823,116032,23520,42875,276325,43008,
    355 73542,23625,320625,43200,43218,396018,23814,323190,348160,118400,
    356 24000,19740,24010,325850,43904,55246,347058,24192,44100,284220,
    357 119880,24300,374220,476280,24500,307924,24576,44800,435200,20304,
    358 24696,335160,483840,45360,440640,25000,359912,25088,340480,124320,
    359 25200,20727,321273,46080,78795,415125,46305,298431,125874,25515,
    360 346275,25600,21056,373184,105760,21150,25725,349125,47040,303168,
    361 127872,25920,47250,351918,107082,400950,47628,333172,103256,26244,
    362 26250,356250,48000,48020,309484,130536,26460,359100,48384,470016,
    363 48600,498900,253012,132608,26880,49000,315800,49152,84048,27000,
    364 415800,49392,452592,27216,369360,134865,425775,22560,27440,372400,
    365 50176,85799,373977,27648,50400,50421,439179,22842,27783,377055,
    366 544320,28000,23030,356970,51200,87550,28125,404901,28224,51450,
    367 331590,139860,28350,384750,51840,532160,23500,387828,28672,389120,
    368 142080,28800,23688,28812,391020,118980,445500,52920,341064,143856,
    369 29160,425000,24064,426496,145040,29400,399000,53760,62403,459837,
    370 54000,402192,146853,433755,54432,380768,148000,30000,24675,437325,
    371 54880,353696,149184,30240,55125,355275,55296,94554,30375,467775,
    372 55566,509166,30618,30625,233353,151552,30720,56000,417088,126912,
    373 25380,30870,418950,56448,517248,31104,56700,550800,31250,449890,
    374 31360,425600,57344,98056,31500,427500,57600,57624,528024,31752,
    375 430920,622080,32000,26320,466480,132200,462744,32256,58800,378960,
    376 159840,32400,26649,472311,635040,59535,383697,32768,129070,32805,
    377 478125,27072,32928,60025,386855,163170,33075,448875,60480,587520,
    378 60750,452466,171159,316265,165760,33600,27636,33614,394750,61440,
    379 105060,33750,519750,61740,397908,167832,34020,461700,62208,638592,
    380 28200,34300,465500,62720,404224,170496,34560,63000,469224,142776,
    381 534600,63504,581904,34992,35000,475000,64000,476672,174048,35280,
    382 478800,64512,110313,516375,64800,64827,594027,6346,29375,484785,
    383 35840,486400,65536,112064,36000,29610,36015,488775,65856,82869,
    384 520587,36288,66150,426330,179820,36450,531250,30080,533120,181300,
    385 36750,461886,36864,67200,67228,585572,30456,37044,502740,725760,
    386 68040,475960,185000,37500,539868,37632,68600,442120,186480,37800,
    387 513000,69120,740880,517104,188811,368245,189440,38400,31584,38416,
    388 521360,158640,31725,562275,70560,454752,191808,38880,70875,527877,
    389 160623,601425,39200,32242,499758,71680,83204,39366,39375,534375,
    390 72000,72030,464226,195804,39690,538650,72576,705024,40000,32900,
    391 583100,165250,379518,198912,40320,73500,473700,73728,126072,40500,
    392 623700,74088,678888,40824,554040,40960,630784,169216,33840,41160,
    393 558600,75264,689664,41472,75600,734400,34263,607257,609280,207200,
    394 42000,34545,535455,76800,76832,54493,649539,42336,77175,497385,
    395 209790,42525,577125,77760,798240,35250,42875,538867,43008,78400,
    396 505280,213120,43200,35532,43218,586530,178470,668250,79380,511596,
    397 215784,43740,43750,593750,36096,43904,595840,217560,44100,598500,
    398 80640,783360,81000,603288,228212,642700,44800,36848,571152,81920,
    399 140080,45000,693000,82320,530544,223776,45360,615600,82944,141831,
    400 709625,37600,83349,583051,180698,45927,395967,227328,46080,84000,
    401 84035,541597,190368,38070,46305,628425,84672,775872,46656,85050,
    402 594950,231250,46875,442771,232064,47040,85750,552650,86016,147084,
    403 47250,641250,86400,86436,792036,47628,646380,696320,236800,48000,
    404 39480,48020,651700,87808,110492,694116,48384,88200,568440,239760,
    405 48600,748440,952560,49000,615848,49152,89600,104005,766395,40608,
    406 49392,670320,244755,722925,90720,881280,50000,41125,678699,50176,
    407 680960,248640,50400,41454,50421,592125,92160,157590,50625,779625,
    408 92610,596862,251748,51030,692550,51200,42112,746368,211520,42300,
    409 51450,698250,94080,606336,255744,51840,94500,703836,214164,801900,
    410 95256,666344,206512,52488,52500,712500,96000,96040,618968,261072,
    411 52920,718200,96768,940032,97200,988281,9519,506024,265216,53760,
    412 98000,631600,98304,168096,54000,44415,787185,98784,905184,54432,
    413 99225,639495,269730,54675,796875,45120,54880,744800,100352,171598,
    414 55125,692829,55296,100800,100842,878358,45684,55566,754110,285265,
    415 803375,56000,46060,713940,102400,175100,56250,809802,56448,102900,
    416 663180,279720,56700,769500,103680,1064320,47000,775656,57344,778240,
    417 284160,57600,47376,57624,782040,237960,891000,105840,682128,287712,
    418 58320,850000,48128,852992,290080,58800,48363,749637,107520,124806,
    419 59049,860625,108000,108045,696339,293706,59535,807975,108864,761536,
    420 296000,60000,49350,60025,814625,109760,138115,569277,298368,60480,
    421 110250,710550,110592,189108,60750,935550,111132,1018332,61236,61250,
    422 466706,303104,61440,112000,834176,253824,50760,61740,837900,112896,
    423 1034496,62208,113400,1101600,62500,899780,62720,851200,114688,196112,
    424 63000,855000,115200,115248,1056048,63504,861840,314685,929475,64000,
    425 52640,932960,264400,52875,872613,64512,117600,117649,640271,319680,
    426 64800,53298,64827,879795,267705,1002375,119070,767394,65536,258140,
    427 65610,65625,890625,54144,65856,120050,773710,326340,66150,897750,
    428 120960,1175040,121500,904932,342318,632530,331520,67200,55272,67228,
    429 789500,122880,210120,67500,1039500,123480,795816,335664,68040,923400,
    430 124416,1277184,56400,68600,931000,125440,145607,662841,340992,69120,
    431 126000,938448,285552,57105,1012095,127008,1163808,69984,70000,57575,
    432 892425,128000,218875,734469,348096,70560,128625,828975,129024,220626,
    433 70875,961875,129600,129654,1188054,12692,58750,969570,71680,972800,
    434 131072,224128,72000,59220,72030,977550,131712,165738,1041174,72576,
    435 132300,852660,359640,72900,1062500,60160,1066240,362600,73500,923772,
    436 73728,134400,134456,1171144,60912,74088,1005480,1451520,136080,951920,
    437 370000,75000,1079736,75264,137200,884240,372960,75600,62181,963819,
    438 138240,236385,1245375,138915,895293,377622,76545,659945,378880,76800,
    439 63168,76832,1042720,317280,63450,77175,1047375,141120,909504,383616,
    440 77760,141750,1055754,321246,78125,1124725,78400,64484,999516,143360,
    441 166408,78732,78750,1068750,144000,144060,928452,391608,79380,1077300,
    442 145152,1410048,80000,65800,1166200,330500,759036,397824,80640,147000,
    443 947400,147456,252144,81000,1247400,148176,1357776,81648,1108080,81920,
    444 322675,938893,338432,67680,82320,1117200,150528,257397,1121931,82944,
    445 151200,151263,1317537,68526,83349,1131165,1218560,414400,84000,69090,
    446 84035,986875,153600,153664,108986,84375,1214703,84672,154350,994770,
    447 419580,85050,1154250,155520,1596480,70500,85750,1077734,86016,156800,
    448 1010560,426240,86400,71064,86436,1173060,356940,1336500,158760,1023192,
    449 431568,87480,87500,1187500,72192,87808,1191680,435120,88200,1197000,
    450 161280,187209,1379511,162000,1206576,440559,15865,1285400,89600,73696,
    451 1142304,163840,280160,90000,74025,1311975,164640,1061088,447552,90720,
    452 165375,1065825,165888,283662,91125,1328125,75200,166698,1166102,361396,
    453 91854,91875,700059,454656,92160,168000,168070,1083194,380736,76140,
    454 92610,1256850,169344,1551744,93312,170100,1189900,462500,93750,885542,
    455 464128,94080,171500,1105300,172032,294168,94500,1282500,172800,172872,
    456 1584072,95256,1292760,1392640,473600,96000,78960,96040,1303400,175616,
    457 220984,1388232,96768,176400,1136880,479520,97200,79947,1416933,1905120,
    458 98000,80605,1151091,98304,179200,208010,98415,1434375,81216,98784,
    459 180075,1160565,489510,99225,1346625,181440,1762560,100000,82250,1357398,
    460 100352,413125,948795,497280,100800,82908,100842,1184250,184320,315180,
    461 101250,1559250,185220,1193724,503496,102060,1385100,102400,84224,1492736,
    462 423040,84600,102900,1396500,188160,1212672,511488,103680,189000,1407672,
    463 428328,1603800,190512,1332688,413024,104976,105000,1425000,192000,192080,
    464 1237936,522144,105840,1436400,193536,330939,1549125,194400,194481,1782081,
    465 19038,88125,923923,530432,107520,196000,1263200,196608,336192,108000,
    466 88830,108045,1466325,197568,248607,1561761,108864,198450,1278990,539460,
    467 109350,109375,1484375,90240,109760,1489600,200704,343196,110250,1385658,
    468 110592,201600,201684,1756716,91368,111132,1508220,570530,1606750,112000,
    469 92120,1427880,204800,350200,112500,1619604,112896,205800,1326360,559440,
    470 113400,1539000,207360,2128640,94000,1551312,114688,451745,1104735,568320,
    471 115200,94752,115248,1564080,475920,95175,1686825,211680,1364256,575424,
    472 116640,212625,1487375,96256,481869,1224115,580160,117600,96726,117649,
    473 1381625,215040,249612,118098,118125,1603125,216000,216090,1392678,587412,
    474 119070,1615950,217728,1523072,592000,120000,98700,120050,1629250,219520,
    475 276230,1138554,596736,120960,220500,1421100,221184,378216,121500,1871100,
    476 222264,2036664,122472,122500,933412,606208,122880,224000,1668352,507648,
    477 101520,123480,1675800,225792,2068992,124416,226800,2203200,102789,22211,
    478 1799560,125440,1702400,229376,392224,126000,103635,1606365,230400,230496,
    479 163479,1948617,127008,231525,1492155,629370,127575,1731375,128000,105280,
    480 1865920,528800,105750,128625,1616601,129024,235200,235298,1280542,639360,
    481 129600,106596,129654,1759590,535410,2004750,238140,1534788,131072,516280,
    482 131220,131250,1781250,108288,131712,240100,1547420,652680,132300,1795500,
    483 241920,2350080,243000,1809864,684636,1265060,663040,134400,110544,134456,
    484 1579000,245760,420240,135000,2079000,246960,1591632,671328,136080,1846800,
    485 248832,425493,2128875,112800,137200,112847,1749153,250880,291214,137781,
    486 1187901,681984,138240,252000,252105,1624791,571104,114210,138915,1885275,
    487 254016,2327616,139968,140000,115150,1784850,256000,437750,140625,1328313,
    488 696192,141120,257250,1657950,258048,441252,141750,1923750,259200,259308,
    489 2376108,25384,117500,1939140,143360,1945600,262144,448256,144000,118440,
    490 144060,1955100,263424,331476,2082348,145152,264600,1705320,719280,145800,
    491 2125000,120320,2132480,725200,147000,1847544,147456,268800,268912,43103,
    492 2299185,121824,148176,2010960,734265,2168775,272160,1903840,740000,150000,
    493 123375,2036097,150528,274400,1768480,745920,151200,124362,151263,1776375,
    494 276480,472770,151875,2338875,277830,1790586,755244,153090,153125,1166765,
    495 757760,153600,126336,153664,2085440,634560,126900,154350,2094750,282240,
    496 1819008,767232,155520,283500,2111508,642492,156250,2249450,156800,128968,
    497 1999032,286720,332816,157464,157500,2137500,288000,288120,1856904,783216,
    498 158760,2154600,290304,2820096,160000,131600,2332400,632443,28557,1518072,
    499 795648,161280,294000,1894800,294912,504288,162000,133245,2361555,296352,
    500 2715552,163296,297675,1918485,163840,645350,164025,1713761,676864,135360,
    501 164640,300125,1934275,301056,514794,165375,2078487,165888,302400,302526,
    502 2635074,137052,166698,2262330,855795,1581325,828800,168000,138180,168070,
    503 1973750,307200,307328,217972,168750,2429406,169344,308700,1989540,839160,
    504 170100,2308500,311040,3192960,141000,171500,2155468,172032,313600,2021120,
    505 852480,172800,142128,172872,2346120,713880,2673000,317520,2046384,863136,
    506 174960,175000,2375000,144384,175616,2383360,870240,176400,145089,2248911,
    507 322560,374418,177147,2581875,324000,324135,2089017,881118,31730,146875,
    508 2423925,179200,147392,2284608,327680,560320,180000,148050,180075,2443875,
    509 329280,414345,1707831,895104,181440,330750,2131650,331776,567324,182250,
    510 2656250,150400,333396,2332204,722792,183708,183750,1400118,909312,184320,
    511 336000,336140,2166388,761472,152280,185220,2513700,338688,3103488,186624,
    512 340200,2379800,925000,187500,1771084,928256,188160,343000,2210600,344064,
    513 588336,189000,2565000,345600,345744,3168144,190512,2585520,944055,1841225,
    514 947200,192000,157920,192080,2606800,351232,441968,158625,2617839,193536,
    515 352800,352947,1920813,959040,194400,159894,194481,2639385,803115,3007125,
    516 196000,161210,2302182,196608,358400,416020,196830,196875,2671875,162432,
    517 197568,360150,2321130,979020,198450,2693250,362880,3525120,200000,164500,
    518 2714796,200704,826250,1897590,994560,201600,165816,201684,2368500,368640,
    519 630360,202500,3118500,370440,2387448,1006992,204120,2770200,204800,168448,
    520 2985472,846080,169200,205800,2793000,376320,436821,1988523,1022976,207360,
    521 378000,2815344,856656,171315,3036285,381024,2665376,826048,209952,210000,
    522 172725,2677275,384000,384160,272465,2203407,1044288,211680,385875,2486925,
    523 387072,661878,212625,2885625,388800,388962,3564162,38076,176250,214375,
    524 1633471,1060864,215040,392000,2526400,393216,672384,216000,177660,216090,
    525 2932650,395136,497214,3123522,217728,396900,2557980,1078920,218700,218750,
    526 2968750,180480,219520,2979200,401408,686392,220500,2771316,221184,403200,
    527 403368,3513432,182736,222264,3016440,1141060,3213500,224000,184240,2855760,
    528 409600,700400,225000,3239208,225792,411600,2652720,1118880,226800,186543,
    529 2891457,414720,709155,3548125,188000,416745,2685879,229376,903490,229635,
    530 1979835,1136640,230400,189504,230496,420175,2707985,951840,190350,231525,
    531 3142125,423360,2728512,1150848,233280,425250,2974750,192512,963738,234375,
    532 2213855,1160320,235200,193452,235298,2763250,430080,499224,236196,236250,
    533 3206250,432000,432180,2785356,1174824,238140,3231900,435456,3046144,1184000,
    534 240000,197400,240100,3258500,439040,552460,2277108,1193472,241920,441000,
    535 2842200,442368,756432,243000,3742200,444528,4073328,244944,245000,1866824,
    536 1212416,245760,448000,520025,2816679,1015296,203040,246960,3351600,451584,
    537 772191,3365793,248832,453600,453789,3952611,205578,44422,205625,3393495,
    538 250880,3404800,458752,784448,252000,207270,252105,2960625,460800,460992,
    539 326958,253125,3644109,254016,463050,2984310,1258740,255150,3462750,256000,
    540 210560,3731840,1057600,211500,257250,3233202,258048,470400,470596,2561084,
    541 1278720,259200,213192,259308,3519180,1070820,4009500,476280,3069576,262144,
    542 1032560,262440,262500,3562500,216576,263424,480200,3094840,1305360,264600,
    543 3591000,483840,561627,4138533,486000,3619728,1321677,47595,2530120,1326080,
    544 268800,221088,268912,3158000,491520,840480,270000,222075,3935925,493920,
    545 3183264,1342656,272160,496125,3197475,497664,850986,273375,3984375,225600,
    546 274400,225694,3498306,501760,582428,275562,275625,2100177,1363968,276480,
    547 504000,504210,3249582,1142208,228420,277830,3770550,508032,918293,3736939,
    548 279936,280000,230300,3569700,512000,875500,281250,2656626,1392384,282240,
    549 514500,3315900,516096,882504,283500,3847500,518400,518616,4752216,50768,
    550 235000,3878280,286720,3891200,524288,896512,288000,236880,288120,3910200,
    551 526848,662952,4164696,290304,529200,3410640,1438560,291600,239841,4010159,
    552 240640,4264960,1450400,294000,241815,3453273,294912,537600,537824,86206,
    553 295245,4303125,243648,296352,540225,3481695,1468530,297675,4039875,544320,
    554 3807680,1480000,300000,246750,300125,3772069,301056,548800,690575,2846385,
    555 1491840,302400,248724,302526,3552750,552960,945540,303750,4677750,555660,
    556 3581172,1510488,306180,306250,2333530,1515520,307200,252672,307328,4170880,
    557 1269120,253800,308700,4189500,564480,3638016,1534464,311040,567000,4223016,
    558 1284984,312500,4498900,313600,257936,3998064,573440,665632,314928,315000,
    559 4275000,576000,576240,3713808,1566432,317520,4309200,580608,992817,4647375,
    560 320000,263200,583443,4081357,1264886,57114,264375,2771769,1591296,322560,
    561 588000,588245,3201355,589824,1008576,324000,266490,324135,4398975,592704,
    562 745821,4685283,326592,595350,3836970,327680,1290700,328050,328125,3099397,
    563 1353728,270720,329280,600250,3868550,602112,1029588,330750,4156974,331776,
    564 604800,605052,5270148,274104,333396,4524660,1711590,3162650,1657600,336000,
    565 276360,336140,3947500,614400,614656,435944,337500,4858812,338688,617400,
    566 3979080,1678320,340200,4617000,622080,6385920,282000,343000,4310936,344064,
    567 627200,728035,3314205,1704960,345600,284256,345744,4692240,1427760,285525,
    568 5060475,635040,4092768,1726272,349920,350000,287875,4462125,288768,351232,
    569 1094375,3672345,1740480,352800,290178,352947,4144875,645120,748836,354294,
    570 354375,4809375,648000,648270,4178034,1762236,63460,293750,4847850,358400,
    571 294784,4569216,655360,1120640,360000,296100,360150,4887750,658560,828690,
    572 3415662,1790208,362880,661500,4263300,663552,1134648,364500,5312500,300800,
    573 666792,4664408,1445584,367416,367500,2800236,1818624,368640,672000,672280,
    574 4332776,1522944,304560,370440,5027400,677376,6206976,373248,680400,4759600,
    575 1850000,308367,66633,3542168,1856512,376320,686000,4421200,688128,1176672,
    576 378000,310905,4819095,691200,691488,490437,5845851,381024,694575,4476465,
    577 1888110,382725,3299725,1894400,384000,315840,384160,5213600,702464,883936,
    578 317250,385875,4849803,387072,705600,705894,3841626,1918080,388800,319788,
    579 388962,5278770,1606230,390625,5623625,392000,322420,4604364,393216,716800,
    580 832040,393660,393750,5343750,324864,395136,720300,4642260,1958040,396900,
    581 5386500,725760,7050240,400000,329000,5429592,401408,1652500,3795180,1989120,
    582 403200,331632,403368,4737000,737280,1260720,405000,6237000,740880,4774896,
    583 2013984,408240,5540400,409600,336896,1276479,4694465,1692160,338400,411600,
    584 338541,5247459,752640,873642,413343,3563703,2045952,414720,756000,756315,
    585 4874373,1713312,342630,416745,5655825,762048,5330752,1652096,419904,420000,
    586 345450,420175,4934375,768000,768320,544930,421875,3984939,2088576,423360,
    587 771750,4973850,774144,1323756,425250,5771250,777600,777924,7128324,76152,
    588 352500,428750,3266942,2121728,430080,784000,5052800,786432,1344768,432000,
    589 355320,432180,5865300,790272,994428,6247044,435456,793800,5115960,2157840,
    590 437400,437500,5937500,360960,439040,5958400,802816,1372784,441000,5542632,
    591 442368,806400,806736,129309,6897555,365472,444528,6032880,2202795,79325,
    592 6427000,448000,368480,5711520,819200,1400800,450000,370125,6108291,451584,
    593 823200,823543,4481897,2237760,453600,373086,453789,5329125,829440,1418310,
    594 455625,6640625};
    595 
    596 char *s[]={
    597 "The %dth humble number is %d.\n",
    598 "The %dst humble number is %d.\n",
    599 "The %dnd humble number is %d.\n",
    600 "The %drd humble number is %d.\n"};
    601 
    602 short int ss[]={
    603 0,1,2,3,0,0,0,0,0,0,
    604 0,0,0,0,0,0,0,0,0,0,
    605 0,1,2,3,0,0,0,0,0,0,
    606 0,1,2,3,0,0,0,0,0,0,
    607 0,1,2,3,0,0,0,0,0,0,
    608 0,1,2,3,0,0,0,0,0,0,
    609 0,1,2,3,0,0,0,0,0,0,
    610 0,1,2,3,0,0,0,0,0,0,
    611 0,1,2,3,0,0,0,0,0,0,
    612 0,1,2,3,0,0,0,0,0,0};
    613 
    614 int main()
    615 {
    616     int n;
    617     for (n=NUM_2; n<NUM; ++n)
    618         Humble[n]+=Humble[n-1];
    619     while (1)
    620     {
    621         scanf("%d", &n);
    622         if ( n==0 ) break;
    623         printf(s[ss[n%100]], n, Humble[n-1]);
    624     }
    625     return 0;
    626 }
    观看代码

    一句评论:我被雷到了! 在ZOJ上,这个代码因为长度限制,不能通过,所以就有了第二份代

    代码2:

     1 // 以下程式碼由 sagit 所撰寫,學術使用可自由轉載,但請註明本站網址。
     2 // Sagit's ACM Code:  http://www3.tcgs.tc.edu.tw/~sagit/acm/
     3 
     4 // 類似 Q136 - Ugly Numbers 
     5 #include <iostream>
     6 #define NUM 5842
     7 
     8 using namespace std;
     9 
    10 int Humble[NUM];
    11 
    12 int main()
    13 {
    14     int i, a2, a3, a5, a7, m;
    15     Humble[0]=1;
    16     for (i=1, m=1; i<NUM; i++)
    17     {
    18         for (a7=i/7; a7<i; a7++)
    19             if ( Humble[a7]*7>m ) break;
    20         for (a5=a7; a5<i; a5++)
    21             if ( Humble[a5]*5>m ) break;
    22         for (a3=a5; a3<i; a3++)
    23             if ( Humble[a3]*3>m ) break;
    24         for (a2=a3; a2<i; a2++)
    25             if ( Humble[a2]*2>m ) break;
    26         m=Humble[a2]*2;
    27         if ( m>Humble[a3]*3 ) m=Humble[a3]*3;
    28         if ( m>Humble[a5]*5 ) m=Humble[a5]*5;
    29         if ( m>Humble[a7]*7 ) m=Humble[a7]*7;
    30         Humble[i]=m;
    31     }
    32     while (1)
    33     {
    34         cin >> m;
    35         if ( m==0 ) break;
    36         if ( m%10==1 && m%100!=11 )
    37             cout << "The " << m << "st humble number is ";
    38         else if ( m%10==2 && m%100!=12 )
    39             cout << "The " << m << "nd humble number is ";
    40         else if ( m%10==3 && m%100!=13 )
    41             cout << "The " << m << "rd humble number is ";
    42         else cout << "The " << m << "th humble number is ";
    43         cout << Humble[m-1] << "." << endl;
    44     }
    45     return 0;
    46 }
    观看代码

    这样就AC了

  • 相关阅读:
    移动应用安全开发指南(Android)--完结篇
    云存储密钥优化
    [安全分析报告]门磁报警系统破解猜想
    Web安全开发指南--文件系统
    C# 创建execl文件 并且填充数据
    asp.net js 获取服务器控件值
    js 日期天数相加减,格式化yyyy-MM-dd
    js获取当期日期累加天数
    ComboGrid 行内点击编辑内容
    ajax数据显示,使用js通用模板
  • 原文地址:https://www.cnblogs.com/TonyNeal/p/zoj_c122.html
Copyright © 2020-2023  润新知