Guest User

Untitled

a guest
Feb 4th, 2017
225
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. long long a[10000005];
  4. long long f(int x) {
  5.   long long sum = 0;
  6.   int i = 1;
  7.   for (; i * i < x; i++) {
  8.     if (x % i == 0) {
  9.       sum += i + x / i;
  10.     }
  11.   }
  12.   if (i * i == x) {
  13.     sum += i;
  14.   }
  15.   return abs(sum - x - x);
  16. }
  17. int main() {
  18.   a[0] = 0LL;
  19.   a[10000] = 27990750LL;
  20.   a[20000] = 111961729LL;
  21.   a[30000] = 251978281LL;
  22.   a[40000] = 447976903LL;
  23.   a[50000] = 699936153LL;
  24.   a[60000] = 1007930277LL;
  25.   a[70000] = 1371896635LL;
  26.   a[80000] = 1791812108LL;
  27.   a[90000] = 2267697750LL;
  28.   a[100000] = 2799463811LL;
  29.   a[110000] = 3387528615LL;
  30.   a[120000] = 4031276810LL;
  31.   a[130000] = 4731352554LL;
  32.   a[140000] = 5487020366LL;
  33.   a[150000] = 6298944788LL;
  34.   a[160000] = 7166874510LL;
  35.   a[170000] = 8090629303LL;
  36.   a[180000] = 9070577386LL;
  37.   a[190000] = 10106119247LL;
  38.   a[200000] = 11198049943LL;
  39.   a[210000] = 12345986142LL;
  40.   a[220000] = 13550021654LL;
  41.   a[230000] = 14809187546LL;
  42.   a[240000] = 16125364033LL;
  43.   a[250000] = 17497102431LL;
  44.   a[260000] = 18925099675LL;
  45.   a[270000] = 20408793252LL;
  46.   a[280000] = 21948767429LL;
  47.   a[290000] = 23544318286LL;
  48.   a[300000] = 25196309222LL;
  49.   a[310000] = 26903374443LL;
  50.   a[320000] = 28667362531LL;
  51.   a[330000] = 30487483378LL;
  52.   a[340000] = 32363201339LL;
  53.   a[350000] = 34295057069LL;
  54.   a[360000] = 36282699764LL;
  55.   a[370000] = 38325976006LL;
  56.   a[380000] = 40425977401LL;
  57.   a[390000] = 42581327115LL;
  58.   a[400000] = 44793245133LL;
  59.   a[410000] = 47059878552LL;
  60.   a[420000] = 49384987618LL;
  61.   a[430000] = 51764170944LL;
  62.   a[440000] = 54199526684LL;
  63.   a[450000] = 56691811460LL;
  64.   a[460000] = 59238977555LL;
  65.   a[470000] = 61842713133LL;
  66.   a[480000] = 64502197433LL;
  67.   a[490000] = 67217309592LL;
  68.   a[500000] = 69989222545LL;
  69.   a[510000] = 72817366522LL;
  70.   a[520000] = 75700239456LL;
  71.   a[530000] = 78640245262LL;
  72.   a[540000] = 81636016465LL;
  73.   a[550000] = 84686906449LL;
  74.   a[560000] = 87794471765LL;
  75.   a[570000] = 90957521057LL;
  76.   a[580000] = 94177329953LL;
  77.   a[590000] = 97452569279LL;
  78.   a[600000] = 100785183943LL;
  79.   a[610000] = 104171059689LL;
  80.   a[620000] = 107614955453LL;
  81.   a[630000] = 111115226578LL;
  82.   a[640000] = 114670174729LL;
  83.   a[650000] = 118281093826LL;
  84.   a[660000] = 121949022572LL;
  85.   a[670000] = 125672060120LL;
  86.   a[680000] = 129452143113LL;
  87.   a[690000] = 133288029463LL;
  88.   a[700000] = 137178239051LL;
  89.   a[710000] = 141126149305LL;
  90.   a[720000] = 145130091580LL;
  91.   a[730000] = 149188065848LL;
  92.   a[740000] = 153304423402LL;
  93.   a[750000] = 157475559774LL;
  94.   a[760000] = 161703757783LL;
  95.   a[770000] = 165985951233LL;
  96.   a[780000] = 170325571991LL;
  97.   a[790000] = 174720174552LL;
  98.   a[800000] = 179172015782LL;
  99.   a[810000] = 183680455332LL;
  100.   a[820000] = 188243858141LL;
  101.   a[830000] = 192861397853LL;
  102.   a[840000] = 197538217172LL;
  103.   a[850000] = 202268965558LL;
  104.   a[860000] = 207054277006LL;
  105.   a[870000] = 211898887671LL;
  106.   a[880000] = 216799100793LL;
  107.   a[890000] = 221752088384LL;
  108.   a[900000] = 226763843004LL;
  109.   a[910000] = 231830953841LL;
  110.   a[920000] = 236955439125LL;
  111.   a[930000] = 242134642413LL;
  112.   a[940000] = 247369934886LL;
  113.   a[950000] = 252660776851LL;
  114.   a[960000] = 258007044179LL;
  115.   a[970000] = 263409398640LL;
  116.   a[980000] = 268870164643LL;
  117.   a[990000] = 274386261385LL;
  118.   a[1000000] = 279956735225LL;
  119.   a[1010000] = 285583592548LL;
  120.   a[1020000] = 291266587599LL;
  121.   a[1030000] = 297005770399LL;
  122.   a[1040000] = 302798347510LL;
  123.   a[1050000] = 308652453130LL;
  124.   a[1060000] = 314558051521LL;
  125.   a[1070000] = 320521451595LL;
  126.   a[1080000] = 326541744205LL;
  127.   a[1090000] = 332616177552LL;
  128.   a[1100000] = 338747704735LL;
  129.   a[1110000] = 344935391847LL;
  130.   a[1120000] = 351176407800LL;
  131.   a[1130000] = 357474772410LL;
  132.   a[1140000] = 363829777729LL;
  133.   a[1150000] = 370240504444LL;
  134.   a[1160000] = 376708767820LL;
  135.   a[1170000] = 383234407195LL;
  136.   a[1180000] = 389812663624LL;
  137.   a[1190000] = 396447006035LL;
  138.   a[1200000] = 403138130805LL;
  139.   a[1210000] = 409885644617LL;
  140.   a[1220000] = 416687657421LL;
  141.   a[1230000] = 423547613587LL;
  142.   a[1240000] = 430460680204LL;
  143.   a[1250000] = 437431440460LL;
  144.   a[1260000] = 444458648663LL;
  145.   a[1270000] = 451541258024LL;
  146.   a[1280000] = 458681983663LL;
  147.   a[1290000] = 465877677976LL;
  148.   a[1300000] = 473126135970LL;
  149.   a[1310000] = 480431774009LL;
  150.   a[1320000] = 487795131298LL;
  151.   a[1330000] = 495213390154LL;
  152.   a[1340000] = 502688717095LL;
  153.   a[1350000] = 510219844984LL;
  154.   a[1360000] = 517804987240LL;
  155.   a[1370000] = 525451665377LL;
  156.   a[1380000] = 533148601082LL;
  157.   a[1390000] = 540903000121LL;
  158.   a[1400000] = 548713540081LL;
  159.   a[1410000] = 556581392214LL;
  160.   a[1420000] = 564502723239LL;
  161.   a[1430000] = 572482091082LL;
  162.   a[1440000] = 580516999436LL;
  163.   a[1450000] = 588608576173LL;
  164.   a[1460000] = 596755370130LL;
  165.   a[1470000] = 604961567463LL;
  166.   a[1480000] = 613220248762LL;
  167.   a[1490000] = 621530161715LL;
  168.   a[1500000] = 629901364734LL;
  169.   a[1510000] = 638326577600LL;
  170.   a[1520000] = 646811079481LL;
  171.   a[1530000] = 655350797808LL;
  172.   a[1540000] = 663944812589LL;
  173.   a[1550000] = 672593025176LL;
  174.   a[1560000] = 681302187855LL;
  175.   a[1570000] = 690065023038LL;
  176.   a[1580000] = 698882876964LL;
  177.   a[1590000] = 707757463217LL;
  178.   a[1600000] = 716687144474LL;
  179.   a[1610000] = 725673882519LL;
  180.   a[1620000] = 734717407156LL;
  181.   a[1630000] = 743815208962LL;
  182.   a[1640000] = 752971118969LL;
  183.   a[1650000] = 762181959748LL;
  184.   a[1660000] = 771447289303LL;
  185.   a[1670000] = 780769265231LL;
  186.   a[1680000] = 790148269014LL;
  187.   a[1690000] = 799583587083LL;
  188.   a[1700000] = 809072691800LL;
  189.   a[1710000] = 818625245853LL;
  190.   a[1720000] = 828224256852LL;
  191.   a[1730000] = 837882203545LL;
  192.   a[1740000] = 847596610385LL;
  193.   a[1750000] = 857369026679LL;
  194.   a[1760000] = 867192999508LL;
  195.   a[1770000] = 877076863908LL;
  196.   a[1780000] = 887012827441LL;
  197.   a[1790000] = 897008064237LL;
  198.   a[1800000] = 907058984255LL;
  199.   a[1810000] = 917166549670LL;
  200.   a[1820000] = 927328562760LL;
  201.   a[1830000] = 937549779052LL;
  202.   a[1840000] = 947825346869LL;
  203.   a[1850000] = 958152268759LL;
  204.   a[1860000] = 968538962215LL;
  205.   a[1870000] = 978983543885LL;
  206.   a[1880000] = 989481824068LL;
  207.   a[1890000] = 1000036825522LL;
  208.   a[1900000] = 1010648330614LL;
  209.   a[1910000] = 1021311856539LL;
  210.   a[1920000] = 1032033086862LL;
  211.   a[1930000] = 1042810723187LL;
  212.   a[1940000] = 1053644906812LL;
  213.   a[1950000] = 1064539409449LL;
  214.   a[1960000] = 1075484284051LL;
  215.   a[1970000] = 1086484572429LL;
  216.   a[1980000] = 1097546987541LL;
  217.   a[1990000] = 1108658415221LL;
  218.   a[2000000] = 1119830640632LL;
  219.   a[2010000] = 1131054075471LL;
  220.   a[2020000] = 1142340095451LL;
  221.   a[2030000] = 1153672697895LL;
  222.   a[2040000] = 1165065527889LL;
  223.   a[2050000] = 1176517080825LL;
  224.   a[2060000] = 1188025980513LL;
  225.   a[2070000] = 1199589643305LL;
  226.   a[2080000] = 1211206316297LL;
  227.   a[2090000] = 1222879870669LL;
  228.   a[2100000] = 1234611408859LL;
  229.   a[2110000] = 1246397176457LL;
  230.   a[2120000] = 1258236979659LL;
  231.   a[2130000] = 1270134379772LL;
  232.   a[2140000] = 1282089155802LL;
  233.   a[2150000] = 1294101351286LL;
  234.   a[2160000] = 1306169129226LL;
  235.   a[2170000] = 1318290251552LL;
  236.   a[2180000] = 1330471567418LL;
  237.   a[2190000] = 1342701232307LL;
  238.   a[2200000] = 1354994032947LL;
  239.   a[2210000] = 1367342603173LL;
  240.   a[2220000] = 1379742743272LL;
  241.   a[2230000] = 1392202166874LL;
  242.   a[2240000] = 1404713295742LL;
  243.   a[2250000] = 1417288307538LL;
  244.   a[2260000] = 1429915598840LL;
  245.   a[2270000] = 1442594907401LL;
  246.   a[2280000] = 1455333120352LL;
  247.   a[2290000] = 1468126485225LL;
  248.   a[2300000] = 1480976046074LL;
  249.   a[2310000] = 1493881244091LL;
  250.   a[2320000] = 1506838367948LL;
  251.   a[2330000] = 1519858680139LL;
  252.   a[2340000] = 1532933658464LL;
  253.   a[2350000] = 1546064256041LL;
  254.   a[2360000] = 1559252321250LL;
  255.   a[2370000] = 1572491256253LL;
  256.   a[2380000] = 1585790498936LL;
  257.   a[2390000] = 1599146600118LL;
  258.   a[2400000] = 1612556427616LL;
  259.   a[2410000] = 1626020157741LL;
  260.   a[2420000] = 1639543160727LL;
  261.   a[2430000] = 1653121832738LL;
  262.   a[2440000] = 1666756168880LL;
  263.   a[2450000] = 1680445294331LL;
  264.   a[2460000] = 1694192088931LL;
  265.   a[2470000] = 1707992241264LL;
  266.   a[2480000] = 1721847921151LL;
  267.   a[2490000] = 1735768110752LL;
  268.   a[2500000] = 1749739576161LL;
  269.   a[2510000] = 1763763475354LL;
  270.   a[2520000] = 1777847905003LL;
  271.   a[2530000] = 1791982746214LL;
  272.   a[2540000] = 1806177343585LL;
  273.   a[2550000] = 1820433400743LL;
  274.   a[2560000] = 1834732771347LL;
  275.   a[2570000] = 1849093609530LL;
  276.   a[2580000] = 1863510156135LL;
  277.   a[2590000] = 1877986364988LL;
  278.   a[2600000] = 1892514985316LL;
  279.   a[2610000] = 1907108125485LL;
  280.   a[2620000] = 1921744105000LL;
  281.   a[2630000] = 1936448765939LL;
  282.   a[2640000] = 1951201880400LL;
  283.   a[2650000] = 1966009269842LL;
  284.   a[2660000] = 1980875397247LL;
  285.   a[2670000] = 1995796348209LL;
  286.   a[2680000] = 2010774653542LL;
  287.   a[2690000] = 2025806626315LL;
  288.   a[2700000] = 2040898001876LL;
  289.   a[2710000] = 2056040943088LL;
  290.   a[2720000] = 2071240002667LL;
  291.   a[2730000] = 2086503329734LL;
  292.   a[2740000] = 2101816504139LL;
  293.   a[2750000] = 2117181748238LL;
  294.   a[2760000] = 2132607502145LL;
  295.   a[2770000] = 2148087308970LL;
  296.   a[2780000] = 2163623355543LL;
  297.   a[2790000] = 2179222135009LL;
  298.   a[2800000] = 2194869777464LL;
  299.   a[2810000] = 2210575616067LL;
  300.   a[2820000] = 2226339675116LL;
  301.   a[2830000] = 2242156674951LL;
  302.   a[2840000] = 2258029293212LL;
  303.   a[2850000] = 2273963411479LL;
  304.   a[2860000] = 2289943142120LL;
  305.   a[2870000] = 2305986713143LL;
  306.   a[2880000] = 2322088937641LL;
  307.   a[2890000] = 2338240306738LL;
  308.   a[2900000] = 2354447151072LL;
  309.   a[2910000] = 2370718951319LL;
  310.   a[2920000] = 2387039455142LL;
  311.   a[2930000] = 2403413881859LL;
  312.   a[2940000] = 2419848208368LL;
  313.   a[2950000] = 2436339560289LL;
  314.   a[2960000] = 2452881141008LL;
  315.   a[2970000] = 2469485079865LL;
  316.   a[2980000] = 2486142158528LL;
  317.   a[2990000] = 2502859779515LL;
  318.   a[3000000] = 2519626160092LL;
  319.   a[3010000] = 2536457062756LL;
  320.   a[3020000] = 2553331681423LL;
  321.   a[3030000] = 2570267421884LL;
  322.   a[3040000] = 2587263510147LL;
  323.   a[3050000] = 2604318665622LL;
  324.   a[3060000] = 2621421023285LL;
  325.   a[3070000] = 2638579819274LL;
  326.   a[3080000] = 2655800546106LL;
  327.   a[3090000] = 2673077564577LL;
  328.   a[3100000] = 2690404913712LL;
  329.   a[3110000] = 2707791066969LL;
  330.   a[3120000] = 2725232696204LL;
  331.   a[3130000] = 2742730695595LL;
  332.   a[3140000] = 2760275620578LL;
  333.   a[3150000] = 2777894414194LL;
  334.   a[3160000] = 2795557268523LL;
  335.   a[3170000] = 2813278227958LL;
  336.   a[3180000] = 2831055647463LL;
  337.   a[3190000] = 2848893272992LL;
  338.   a[3200000] = 2866780188894LL;
  339.   a[3210000] = 2884722147119LL;
  340.   a[3220000] = 2902724280524LL;
  341.   a[3230000] = 2920782606689LL;
  342.   a[3240000] = 2938894712094LL;
  343.   a[3250000] = 2957059638126LL;
  344.   a[3260000] = 2975284044415LL;
  345.   a[3270000] = 2993568172554LL;
  346.   a[3280000] = 3011903709233LL;
  347.   a[3290000] = 3030294099815LL;
  348.   a[3300000] = 3048749692178LL;
  349.   a[3310000] = 3067247425671LL;
  350.   a[3320000] = 3085815344958LL;
  351.   a[3330000] = 3104437395326LL;
  352.   a[3340000] = 3123111333213LL;
  353.   a[3350000] = 3141835261672LL;
  354.   a[3360000] = 3160627775713LL;
  355.   a[3370000] = 3179465625163LL;
  356.   a[3380000] = 3198362186030LL;
  357.   a[3390000] = 3217315180484LL;
  358.   a[3400000] = 3236323965332LL;
  359.   a[3410000] = 3255391953685LL;
  360.   a[3420000] = 3274514620900LL;
  361.   a[3430000] = 3293690659025LL;
  362.   a[3440000] = 3312921845821LL;
  363.   a[3450000] = 3332212924636LL;
  364.   a[3460000] = 3351553781449LL;
  365.   a[3470000] = 3370955337693LL;
  366.   a[3480000] = 3390416263808LL;
  367.   a[3490000] = 3409931985200LL;
  368.   a[3500000] = 3429493399454LL;
  369.   a[3510000] = 3449119867885LL;
  370.   a[3520000] = 3468801326046LL;
  371.   a[3530000] = 3488538524848LL;
  372.   a[3540000] = 3508330664207LL;
  373.   a[3550000] = 3528182332690LL;
  374.   a[3560000] = 3548085172590LL;
  375.   a[3570000] = 3568050120833LL;
  376.   a[3580000] = 3588064988849LL;
  377.   a[3590000] = 3608132028165LL;
  378.   a[3600000] = 3628263562310LL;
  379.   a[3610000] = 3648448095445LL;
  380.   a[3620000] = 3668688231805LL;
  381.   a[3630000] = 3688983187014LL;
  382.   a[3640000] = 3709339754420LL;
  383.   a[3650000] = 3729754027464LL;
  384.   a[3660000] = 3750212418931LL;
  385.   a[3670000] = 3770732729775LL;
  386.   a[3680000] = 3791314462364LL;
  387.   a[3690000] = 3811948464694LL;
  388.   a[3700000] = 3832632987541LL;
  389.   a[3710000] = 3853382162189LL;
  390.   a[3720000] = 3874191047399LL;
  391.   a[3730000] = 3895041264430LL;
  392.   a[3740000] = 3915950897006LL;
  393.   a[3750000] = 3936917829909LL;
  394.   a[3760000] = 3957942081284LL;
  395.   a[3770000] = 3979021695249LL;
  396.   a[3780000] = 4000160514862LL;
  397.   a[3790000] = 4021347538758LL;
  398.   a[3800000] = 4042598997121LL;
  399.   a[3810000] = 4063903896495LL;
  400.   a[3820000] = 4085265954952LL;
  401.   a[3830000] = 4106682705814LL;
  402.   a[3840000] = 4128158128632LL;
  403.   a[3850000] = 4149686560525LL;
  404.   a[3860000] = 4171269797133LL;
  405.   a[3870000] = 4192914449334LL;
  406.   a[3880000] = 4214607197505LL;
  407.   a[3890000] = 4236361861212LL;
  408.   a[3900000] = 4258174796154LL;
  409.   a[3910000] = 4280038730455LL;
  410.   a[3920000] = 4301957468739LL;
  411.   a[3930000] = 4323940338501LL;
  412.   a[3940000] = 4345974606831LL;
  413.   a[3950000] = 4368064801760LL;
  414.   a[3960000] = 4390210309200LL;
  415.   a[3970000] = 4412408359562LL;
  416.   a[3980000] = 4434664056882LL;
  417.   a[3990000] = 4456973910893LL;
  418.   a[4000000] = 4479342359572LL;
  419.   a[4010000] = 4501764866939LL;
  420.   a[4020000] = 4524247169103LL;
  421.   a[4030000] = 4546786549194LL;
  422.   a[4040000] = 4569377778502LL;
  423.   a[4050000] = 4592029639915LL;
  424.   a[4060000] = 4614738979788LL;
  425.   a[4070000] = 4637494482169LL;
  426.   a[4080000] = 4660313533887LL;
  427.   a[4090000] = 4683179045202LL;
  428.   a[4100000] = 4706113370975LL;
  429.   a[4110000] = 4729095435232LL;
  430.   a[4120000] = 4752143870506LL;
  431.   a[4130000] = 4775237171241LL;
  432.   a[4140000] = 4798392164612LL;
  433.   a[4150000] = 4821595210193LL;
  434.   a[4160000] = 4844859439735LL;
  435.   a[4170000] = 4868182289337LL;
  436.   a[4180000] = 4891554451763LL;
  437.   a[4190000] = 4914984961561LL;
  438.   a[4200000] = 4938478334436LL;
  439.   a[4210000] = 4962021365171LL;
  440.   a[4220000] = 4985619020814LL;
  441.   a[4230000] = 5009280573788LL;
  442.   a[4240000] = 5032990373715LL;
  443.   a[4250000] = 5056760641912LL;
  444.   a[4260000] = 5080583063002LL;
  445.   a[4270000] = 5104465324785LL;
  446.   a[4280000] = 5128399125368LL;
  447.   a[4290000] = 5152388363087LL;
  448.   a[4300000] = 5176436056091LL;
  449.   a[4310000] = 5200550643341LL;
  450.   a[4320000] = 5224704672629LL;
  451.   a[4330000] = 5248927315581LL;
  452.   a[4340000] = 5273200111484LL;
  453.   a[4350000] = 5297528435663LL;
  454.   a[4360000] = 5321915407494LL;
  455.   a[4370000] = 5346357882396LL;
  456.   a[4380000] = 5370848858411LL;
  457.   a[4390000] = 5395403435332LL;
  458.   a[4400000] = 5420006439398LL;
  459.   a[4410000] = 5444667118292LL;
  460.   a[4420000] = 5469380966090LL;
  461.   a[4430000] = 5494163151680LL;
  462.   a[4440000] = 5518997101186LL;
  463.   a[4450000] = 5543885797702LL;
  464.   a[4460000] = 5568826840402LL;
  465.   a[4470000] = 5593821664040LL;
  466.   a[4480000] = 5618879420412LL;
  467.   a[4490000] = 5643998289018LL;
  468.   a[4500000] = 5669174509133LL;
  469.   a[4510000] = 5694395714284LL;
  470.   a[4520000] = 5719674755747LL;
  471.   a[4530000] = 5745010344526LL;
  472.   a[4540000] = 5770405410470LL;
  473.   a[4550000] = 5795851787681LL;
  474.   a[4560000] = 5821358455852LL;
  475.   a[4570000] = 5846916722952LL;
  476.   a[4580000] = 5872528572243LL;
  477.   a[4590000] = 5898201639872LL;
  478.   a[4600000] = 5923931061618LL;
  479.   a[4610000] = 5949706668035LL;
  480.   a[4620000] = 5975561121348LL;
  481.   a[4630000] = 6001453553204LL;
  482.   a[4640000] = 6027403670895LL;
  483.   a[4650000] = 6053414383318LL;
  484.   a[4660000] = 6079476584488LL;
  485.   a[4670000] = 6105599461077LL;
  486.   a[4680000] = 6131771883934LL;
  487.   a[4690000] = 6158007474212LL;
  488.   a[4700000] = 6184289863687LL;
  489.   a[4710000] = 6210638254130LL;
  490.   a[4720000] = 6237035096268LL;
  491.   a[4730000] = 6263492740107LL;
  492.   a[4740000] = 6290004093872LL;
  493.   a[4750000] = 6316575827772LL;
  494.   a[4760000] = 6343193630069LL;
  495.   a[4770000] = 6369876377942LL;
  496.   a[4780000] = 6396611098047LL;
  497.   a[4790000] = 6423408199763LL;
  498.   a[4800000] = 6450255981385LL;
  499.   a[4810000] = 6477150279033LL;
  500.   a[4820000] = 6504114322985LL;
  501.   a[4830000] = 6531134873307LL;
  502.   a[4840000] = 6558205223439LL;
  503.   a[4850000] = 6585333536867LL;
  504.   a[4860000] = 6612523782184LL;
  505.   a[4870000] = 6639761969942LL;
  506.   a[4880000] = 6667063060439LL;
  507.   a[4890000] = 6694408550494LL;
  508.   a[4900000] = 6721816887886LL;
  509.   a[4910000] = 6749277965197LL;
  510.   a[4920000] = 6776797156706LL;
  511.   a[4930000] = 6804369530550LL;
  512.   a[4940000] = 6832003121393LL;
  513.   a[4950000] = 6859690659861LL;
  514.   a[4960000] = 6887437202125LL;
  515.   a[4970000] = 6915238643043LL;
  516.   a[4980000] = 6943095478290LL;
  517.   a[4990000] = 6971007772806LL;
  518.   a[5000000] = 6998967689687LL;
  519.   a[5010000] = 7026990868008LL;
  520.   a[5020000] = 7055068769966LL;
  521.   a[5030000] = 7083210265773LL;
  522.   a[5040000] = 7111401757225LL;
  523.   a[5050000] = 7139640573072LL;
  524.   a[5060000] = 7167948582409LL;
  525.   a[5070000] = 7196318212283LL;
  526.   a[5080000] = 7224727902958LL;
  527.   a[5090000] = 7253194270427LL;
  528.   a[5100000] = 7281726362480LL;
  529.   a[5110000] = 7310304723444LL;
  530.   a[5120000] = 7338941067192LL;
  531.   a[5130000] = 7367653945565LL;
  532.   a[5140000] = 7396399438340LL;
  533.   a[5150000] = 7425215535483LL;
  534.   a[5160000] = 7454073535677LL;
  535.   a[5170000] = 7482998318678LL;
  536.   a[5180000] = 7511964477750LL;
  537.   a[5190000] = 7541008608944LL;
  538.   a[5200000] = 7570090816984LL;
  539.   a[5210000] = 7599232591882LL;
  540.   a[5220000] = 7628429146825LL;
  541.   a[5230000] = 7657686036813LL;
  542.   a[5240000] = 7686987046627LL;
  543.   a[5250000] = 7716367725343LL;
  544.   a[5260000] = 7745788636564LL;
  545.   a[5270000] = 7775268507246LL;
  546.   a[5280000] = 7804804595755LL;
  547.   a[5290000] = 7834394813822LL;
  548.   a[5300000] = 7864040054341LL;
  549.   a[5310000] = 7893756415081LL;
  550.   a[5320000] = 7923515234980LL;
  551.   a[5330000] = 7953328278270LL;
  552.   a[5340000] = 7983195008276LL;
  553.   a[5350000] = 8013124015400LL;
  554.   a[5360000] = 8043102482646LL;
  555.   a[5370000] = 8073152309425LL;
  556.   a[5380000] = 8103237055723LL;
  557.   a[5390000] = 8133393371568LL;
  558.   a[5400000] = 8163601405876LL;
  559.   a[5410000] = 8193861871745LL;
  560.   a[5420000] = 8224176568536LL;
  561.   a[5430000] = 8254552323119LL;
  562.   a[5440000] = 8284993562655LL;
  563.   a[5450000] = 8315475411208LL;
  564.   a[5460000] = 8346030488968LL;
  565.   a[5470000] = 8376623255823LL;
  566.   a[5480000] = 8407279868451LL;
  567.   a[5490000] = 8437992726303LL;
  568.   a[5500000] = 8468761991493LL;
  569.   a[5510000] = 8499575668718LL;
  570.   a[5520000] = 8530464622370LL;
  571.   a[5530000] = 8561392916117LL;
  572.   a[5540000] = 8592375539221LL;
  573.   a[5550000] = 8623436603032LL;
  574.   a[5560000] = 8654528324666LL;
  575.   a[5570000] = 8685698114426LL;
  576.   a[5580000] = 8716910208944LL;
  577.   a[5590000] = 8748177380091LL;
  578.   a[5600000] = 8779498346689LL;
  579.   a[5610000] = 8810883178028LL;
  580.   a[5620000] = 8842321746982LL;
  581.   a[5630000] = 8873817663975LL;
  582.   a[5640000] = 8905370375849LL;
  583.   a[5650000] = 8936979614282LL;
  584.   a[5660000] = 8968636688021LL;
  585.   a[5670000] = 9000372125890LL;
  586.   a[5680000] = 9032142058944LL;
  587.   a[5690000] = 9063973458685LL;
  588.   a[5700000] = 9095864608449LL;
  589.   a[5710000] = 9127804313194LL;
  590.   a[5720000] = 9159797690768LL;
  591.   a[5730000] = 9191858094927LL;
  592.   a[5740000] = 9223970574485LL;
  593.   a[5750000] = 9256140686676LL;
  594.   a[5760000] = 9288366610721LL;
  595.   a[5770000] = 9320648191770LL;
  596.   a[5780000] = 9352969247314LL;
  597.   a[5790000] = 9385367143427LL;
  598.   a[5800000] = 9417822991760LL;
  599.   a[5810000] = 9450307971374LL;
  600.   a[5820000] = 9482871475901LL;
  601.   a[5830000] = 9515480784793LL;
  602.   a[5840000] = 9548148902944LL;
  603.   a[5850000] = 9580883505888LL;
  604.   a[5860000] = 9613665386501LL;
  605.   a[5870000] = 9646498707519LL;
  606.   a[5880000] = 9679400775076LL;
  607.   a[5890000] = 9712357260178LL;
  608.   a[5900000] = 9745350495855LL;
  609.   a[5910000] = 9778422592678LL;
  610.   a[5920000] = 9811537046385LL;
  611.   a[5930000] = 9844721344996LL;
  612.   a[5940000] = 9877947177642LL;
  613.   a[5950000] = 9911232284037LL;
  614.   a[5960000] = 9944572179697LL;
  615.   a[5970000] = 9977975234786LL;
  616.   a[5980000] = 10011440094106LL;
  617.   a[5990000] = 10044945592255LL;
  618.   a[6000000] = 10078516896527LL;
  619.   a[6010000] = 10112131890994LL;
  620.   a[6020000] = 10145824709611LL;
  621.   a[6030000] = 10179563495249LL;
  622.   a[6040000] = 10213344373118LL;
  623.   a[6050000] = 10247195281514LL;
  624.   a[6060000] = 10281093967045LL;
  625.   a[6070000] = 10315049186137LL;
  626.   a[6080000] = 10349060340584LL;
  627.   a[6090000] = 10383134742579LL;
  628.   a[6100000] = 10417263257865LL;
  629.   a[6110000] = 10451439193174LL;
  630.   a[6120000] = 10485682663852LL;
  631.   a[6130000] = 10519981874855LL;
  632.   a[6140000] = 10554324278413LL;
  633.   a[6150000] = 10588734863630LL;
  634.   a[6160000] = 10623198400841LL;
  635.   a[6170000] = 10657711803361LL;
  636.   a[6180000] = 10692286076670LL;
  637.   a[6190000] = 10726905354724LL;
  638.   a[6200000] = 10761611075783LL;
  639.   a[6210000] = 10796354910647LL;
  640.   a[6220000] = 10831149942494LL;
  641.   a[6230000] = 10865998158733LL;
  642.   a[6240000] = 10900926194421LL;
  643.   a[6250000] = 10935883860423LL;
  644.   a[6260000] = 10970903583352LL;
  645.   a[6270000] = 11005993341265LL;
  646.   a[6280000] = 11041129134721LL;
  647.   a[6290000] = 11076317029254LL;
  648.   a[6300000] = 11111568014631LL;
  649.   a[6310000] = 11146857472065LL;
  650.   a[6320000] = 11182221779450LL;
  651.   a[6330000] = 11217645883638LL;
  652.   a[6340000] = 11253115158281LL;
  653.   a[6350000] = 11288627147718LL;
  654.   a[6360000] = 11324223432334LL;
  655.   a[6370000] = 11359867745713LL;
  656.   a[6380000] = 11395553839593LL;
  657.   a[6390000] = 11431313407256LL;
  658.   a[6400000] = 11467114005239LL;
  659.   a[6410000] = 11502989374655LL;
  660.   a[6420000] = 11538891506850LL;
  661.   a[6430000] = 11574863780484LL;
  662.   a[6440000] = 11610895337351LL;
  663.   a[6450000] = 11646996213106LL;
  664.   a[6460000] = 11683126590612LL;
  665.   a[6470000] = 11719317416219LL;
  666.   a[6480000] = 11755583377485LL;
  667.   a[6490000] = 11791885646870LL;
  668.   a[6500000] = 11828255135791LL;
  669.   a[6510000] = 11864674909885LL;
  670.   a[6520000] = 11901150805102LL;
  671.   a[6530000] = 11937682367827LL;
  672.   a[6540000] = 11974278742077LL;
  673.   a[6550000] = 12010913393982LL;
  674.   a[6560000] = 12047613207338LL;
  675.   a[6570000] = 12084390829241LL;
  676.   a[6580000] = 12121199933238LL;
  677.   a[6590000] = 12158082478838LL;
  678.   a[6600000] = 12195003429337LL;
  679.   a[6610000] = 12231978695845LL;
  680.   a[6620000] = 12269018633181LL;
  681.   a[6630000] = 12306117380362LL;
  682.   a[6640000] = 12343264281804LL;
  683.   a[6650000] = 12380476651189LL;
  684.   a[6660000] = 12417733840988LL;
  685.   a[6670000] = 12455052827306LL;
  686.   a[6680000] = 12492430123633LL;
  687.   a[6690000] = 12529866933282LL;
  688.   a[6700000] = 12567351679550LL;
  689.   a[6710000] = 12604892767083LL;
  690.   a[6720000] = 12642503155771LL;
  691.   a[6730000] = 12680147657768LL;
  692.   a[6740000] = 12717853776915LL;
  693.   a[6750000] = 12755620539261LL;
  694.   a[6760000] = 12793444632114LL;
  695.   a[6770000] = 12831317705410LL;
  696.   a[6780000] = 12869252543338LL;
  697.   a[6790000] = 12907254270923LL;
  698.   a[6800000] = 12945290142350LL;
  699.   a[6810000] = 12983387117346LL;
  700.   a[6820000] = 13021548035781LL;
  701.   a[6830000] = 13059756825360LL;
  702.   a[6840000] = 13098035670208LL;
  703.   a[6850000] = 13136350837681LL;
  704.   a[6860000] = 13174739427645LL;
  705.   a[6870000] = 13213175404472LL;
  706.   a[6880000] = 13251680711664LL;
  707.   a[6890000] = 13290219386954LL;
  708.   a[6900000] = 13328831103913LL;
  709.   a[6910000] = 13367483323468LL;
  710.   a[6920000] = 13406206740874LL;
  711.   a[6930000] = 13444980067633LL;
  712.   a[6940000] = 13483807465502LL;
  713.   a[6950000] = 13522691641328LL;
  714.   a[6960000] = 13561643785773LL;
  715.   a[6970000] = 13600641492444LL;
  716.   a[6980000] = 13639694867161LL;
  717.   a[6990000] = 13678805456524LL;
  718.   a[7000000] = 13717964739123LL;
  719.   a[7010000] = 13757200288681LL;
  720.   a[7020000] = 13796481455664LL;
  721.   a[7030000] = 13835800453709LL;
  722.   a[7040000] = 13875187542423LL;
  723.   a[7050000] = 13914637964578LL;
  724.   a[7060000] = 13954129324367LL;
  725.   a[7070000] = 13993680484164LL;
  726.   a[7080000] = 14033301459867LL;
  727.   a[7090000] = 14072975135806LL;
  728.   a[7100000] = 14112698345312LL;
  729.   a[7110000] = 14152491680431LL;
  730.   a[7120000] = 14192333284586LL;
  731.   a[7130000] = 14232226362290LL;
  732.   a[7140000] = 14272177301105LL;
  733.   a[7150000] = 14312185370575LL;
  734.   a[7160000] = 14352223984283LL;
  735.   a[7170000] = 14392353624678LL;
  736.   a[7180000] = 14432526825997LL;
  737.   a[7190000] = 14472763536445LL;
  738.   a[7200000] = 14513052318864LL;
  739.   a[7210000] = 14553401008441LL;
  740.   a[7220000] = 14593792935107LL;
  741.   a[7230000] = 14634250071947LL;
  742.   a[7240000] = 14674758548474LL;
  743.   a[7250000] = 14715330018127LL;
  744.   a[7260000] = 14755946902927LL;
  745.   a[7270000] = 14796622037486LL;
  746.   a[7280000] = 14837348490615LL;
  747.   a[7290000] = 14878150347353LL;
  748.   a[7300000] = 14918987588141LL;
  749.   a[7310000] = 14959894117024LL;
  750.   a[7320000] = 15000837959898LL;
  751.   a[7330000] = 15041853144525LL;
  752.   a[7340000] = 15082907668402LL;
  753.   a[7350000] = 15124052587744LL;
  754.   a[7360000] = 15165237155094LL;
  755.   a[7370000] = 15206477536357LL;
  756.   a[7380000] = 15247765711180LL;
  757.   a[7390000] = 15289112102688LL;
  758.   a[7400000] = 15330517647189LL;
  759.   a[7410000] = 15371989478342LL;
  760.   a[7420000] = 15413506492609LL;
  761.   a[7430000] = 15455067300266LL;
  762.   a[7440000] = 15496701705081LL;
  763.   a[7450000] = 15538388175417LL;
  764.   a[7460000] = 15580123979766LL;
  765.   a[7470000] = 15621928946297LL;
  766.   a[7480000] = 15663780839623LL;
  767.   a[7490000] = 15705690584027LL;
  768.   a[7500000] = 15747653435060LL;
  769.   a[7510000] = 15789688522039LL;
  770.   a[7520000] = 15831768142241LL;
  771.   a[7530000] = 15873902763066LL;
  772.   a[7540000] = 15916074147228LL;
  773.   a[7550000] = 15958331362029LL;
  774.   a[7560000] = 16000635715705LL;
  775.   a[7570000] = 16042993996460LL;
  776.   a[7580000] = 16085397673949LL;
  777.   a[7590000] = 16127874713352LL;
  778.   a[7600000] = 16170392488791LL;
  779.   a[7610000] = 16212973741352LL;
  780.   a[7620000] = 16255615239929LL;
  781.   a[7630000] = 16298307945557LL;
  782.   a[7640000] = 16341051158166LL;
  783.   a[7650000] = 16383850098794LL;
  784.   a[7660000] = 16426703749796LL;
  785.   a[7670000] = 16469647057751LL;
  786.   a[7680000] = 16512620375258LL;
  787.   a[7690000] = 16555650504325LL;
  788.   a[7700000] = 16598723824312LL;
  789.   a[7710000] = 16641867406611LL;
  790.   a[7720000] = 16685059097358LL;
  791.   a[7730000] = 16728312077101LL;
  792.   a[7740000] = 16771619879555LL;
  793.   a[7750000] = 16814996229317LL;
  794.   a[7760000] = 16858411643524LL;
  795.   a[7770000] = 16901905179180LL;
  796.   a[7780000] = 16945439299543LL;
  797.   a[7790000] = 16989021951528LL;
  798.   a[7800000] = 17032675386806LL;
  799.   a[7810000] = 17076367360330LL;
  800.   a[7820000] = 17120129136661LL;
  801.   a[7830000] = 17163945332038LL;
  802.   a[7840000] = 17207812050731LL;
  803.   a[7850000] = 17251726927514LL;
  804.   a[7860000] = 17295716020899LL;
  805.   a[7870000] = 17339745172138LL;
  806.   a[7880000] = 17383841459083LL;
  807.   a[7890000] = 17427986023426LL;
  808.   a[7900000] = 17472189074841LL;
  809.   a[7910000] = 17516452081184LL;
  810.   a[7920000] = 17560780777959LL;
  811.   a[7930000] = 17605139805317LL;
  812.   a[7940000] = 17649575543331LL;
  813.   a[7950000] = 17694061652288LL;
  814.   a[7960000] = 17738612148691LL;
  815.   a[7970000] = 17783202782391LL;
  816.   a[7980000] = 17827864898511LL;
  817.   a[7990000] = 17872564428176LL;
  818.   a[8000000] = 17917328540830LL;
  819.   a[8010000] = 17962160937881LL;
  820.   a[8020000] = 18007033145851LL;
  821.   a[8030000] = 18051965921672LL;
  822.   a[8040000] = 18096967390297LL;
  823.   a[8050000] = 18142007726605LL;
  824.   a[8060000] = 18187096934742LL;
  825.   a[8070000] = 18232259145082LL;
  826.   a[8080000] = 18277472969377LL;
  827.   a[8090000] = 18322739832099LL;
  828.   a[8100000] = 18368086415636LL;
  829.   a[8110000] = 18413461683714LL;
  830.   a[8120000] = 18458883834691LL;
  831.   a[8130000] = 18504379554125LL;
  832.   a[8140000] = 18549938756448LL;
  833.   a[8150000] = 18595550835782LL;
  834.   a[8160000] = 18641199172211LL;
  835.   a[8170000] = 18686923544301LL;
  836.   a[8180000] = 18732677829264LL;
  837.   a[8190000] = 18778510003232LL;
  838.   a[8200000] = 18824401921863LL;
  839.   a[8210000] = 18870334633321LL;
  840.   a[8220000] = 18916359191450LL;
  841.   a[8230000] = 18962397644956LL;
  842.   a[8240000] = 19008494654883LL;
  843.   a[8250000] = 19054655730111LL;
  844.   a[8260000] = 19100880158208LL;
  845.   a[8270000] = 19147164642832LL;
  846.   a[8280000] = 19193509640215LL;
  847.   a[8290000] = 19239890131938LL;
  848.   a[8300000] = 19286343713525LL;
  849.   a[8310000] = 19332836485534LL;
  850.   a[8320000] = 19379385282473LL;
  851.   a[8330000] = 19425998835124LL;
  852.   a[8340000] = 19472673171727LL;
  853.   a[8350000] = 19519402541868LL;
  854.   a[8360000] = 19566178071917LL;
  855.   a[8370000] = 19613015587692LL;
  856.   a[8380000] = 19659890413636LL;
  857.   a[8390000] = 19706833052012LL;
  858.   a[8400000] = 19753848205023LL;
  859.   a[8410000] = 19800932154450LL;
  860.   a[8420000] = 19848025193486LL;
  861.   a[8430000] = 19895202127692LL;
  862.   a[8440000] = 19942425157413LL;
  863.   a[8450000] = 19989706016379LL;
  864.   a[8460000] = 20037057787590LL;
  865.   a[8470000] = 20084466128635LL;
  866.   a[8480000] = 20131897698317LL;
  867.   a[8490000] = 20179419183105LL;
  868.   a[8500000] = 20226961467858LL;
  869.   a[8510000] = 20274604192571LL;
  870.   a[8520000] = 20322286734539LL;
  871.   a[8530000] = 20370022509175LL;
  872.   a[8540000] = 20417800120590LL;
  873.   a[8550000] = 20465644821129LL;
  874.   a[8560000] = 20513528262329LL;
  875.   a[8570000] = 20561501844859LL;
  876.   a[8580000] = 20609527459640LL;
  877.   a[8590000] = 20657584682380LL;
  878.   a[8600000] = 20705701202807LL;
  879.   a[8610000] = 20753906412188LL;
  880.   a[8620000] = 20802136641711LL;
  881.   a[8630000] = 20850414809878LL;
  882.   a[8640000] = 20898771087355LL;
  883.   a[8650000] = 20947177842954LL;
  884.   a[8660000] = 20995625554808LL;
  885.   a[8670000] = 21044144311338LL;
  886.   a[8680000] = 21092712786513LL;
  887.   a[8690000] = 21141353770351LL;
  888.   a[8700000] = 21190031185826LL;
  889.   a[8710000] = 21238773908963LL;
  890.   a[8720000] = 21287559595696LL;
  891.   a[8730000] = 21336419462803LL;
  892.   a[8740000] = 21385329914358LL;
  893.   a[8750000] = 21434290337369LL;
  894.   a[8760000] = 21483320179795LL;
  895.   a[8770000] = 21532397830193LL;
  896.   a[8780000] = 21581526234770LL;
  897.   a[8790000] = 21630706295764LL;
  898.   a[8800000] = 21679954268993LL;
  899.   a[8810000] = 21729252578392LL;
  900.   a[8820000] = 21778634743159LL;
  901.   a[8830000] = 21828040865456LL;
  902.   a[8840000] = 21877496123337LL;
  903.   a[8850000] = 21927027452127LL;
  904.   a[8860000] = 21976595437612LL;
  905.   a[8870000] = 22026237853985LL;
  906.   a[8880000] = 22075938939958LL;
  907.   a[8890000] = 22125681908457LL;
  908.   a[8900000] = 22175477747996LL;
  909.   a[8910000] = 22225345034824LL;
  910.   a[8920000] = 22275252475831LL;
  911.   a[8930000] = 22325226844963LL;
  912.   a[8940000] = 22375259852779LL;
  913.   a[8950000] = 22425342744368LL;
  914.   a[8960000] = 22475472243945LL;
  915.   a[8970000] = 22525677468871LL;
  916.   a[8980000] = 22575919308904LL;
  917.   a[8990000] = 22626235175624LL;
  918.   a[9000000] = 22676602132339LL;
  919.   a[9010000] = 22727014766831LL;
  920.   a[9020000] = 22777489626356LL;
  921.   a[9030000] = 22828027960024LL;
  922.   a[9040000] = 22878606161590LL;
  923.   a[9050000] = 22929247899483LL;
  924.   a[9060000] = 22979948974811LL;
  925.   a[9070000] = 23030715414642LL;
  926.   a[9080000] = 23081526751683LL;
  927.   a[9090000] = 23132401359963LL;
  928.   a[9100000] = 23183324642103LL;
  929.   a[9110000] = 23234291637476LL;
  930.   a[9120000] = 23285342823080LL;
  931.   a[9130000] = 23336437585585LL;
  932.   a[9140000] = 23387577095454LL;
  933.   a[9150000] = 23438763167364LL;
  934.   a[9160000] = 23490018946622LL;
  935.   a[9170000] = 23541369702051LL;
  936.   a[9180000] = 23592739859493LL;
  937.   a[9190000] = 23644162780462LL;
  938.   a[9200000] = 23695646060063LL;
  939.   a[9210000] = 23747191886789LL;
  940.   a[9220000] = 23798781306487LL;
  941.   a[9230000] = 23850431443972LL;
  942.   a[9240000] = 23902140705090LL;
  943.   a[9250000] = 23953910609381LL;
  944.   a[9260000] = 24005728305442LL;
  945.   a[9270000] = 24057598482618LL;
  946.   a[9280000] = 24109529331750LL;
  947.   a[9290000] = 24161511828744LL;
  948.   a[9300000] = 24213570530227LL;
  949.   a[9310000] = 24265674825380LL;
  950.   a[9320000] = 24317829381784LL;
  951.   a[9330000] = 24370023700299LL;
  952.   a[9340000] = 24422294152633LL;
  953.   a[9350000] = 24474619097473LL;
  954.   a[9360000] = 24527006104316LL;
  955.   a[9370000] = 24579428458287LL;
  956.   a[9380000] = 24631912093819LL;
  957.   a[9390000] = 24684470805882LL;
  958.   a[9400000] = 24737077931650LL;
  959.   a[9410000] = 24789738095768LL;
  960.   a[9420000] = 24842469259977LL;
  961.   a[9430000] = 24895226615815LL;
  962.   a[9440000] = 24948051700838LL;
  963.   a[9450000] = 25000935218181LL;
  964.   a[9460000] = 25053885889423LL;
  965.   a[9470000] = 25106877039107LL;
  966.   a[9480000] = 25159939417821LL;
  967.   a[9490000] = 25213039027666LL;
  968.   a[9500000] = 25266202926347LL;
  969.   a[9510000] = 25319410451135LL;
  970.   a[9520000] = 25372697113246LL;
  971.   a[9530000] = 25426011309815LL;
  972.   a[9540000] = 25479415704586LL;
  973.   a[9550000] = 25532834489821LL;
  974.   a[9560000] = 25586354817895LL;
  975.   a[9570000] = 25639895570500LL;
  976.   a[9580000] = 25693508167731LL;
  977.   a[9590000] = 25747162949165LL;
  978.   a[9600000] = 25800908274610LL;
  979.   a[9610000] = 25854671504016LL;
  980.   a[9620000] = 25908508509876LL;
  981.   a[9630000] = 25962407295275LL;
  982.   a[9640000] = 26016359221103LL;
  983.   a[9650000] = 26070366415662LL;
  984.   a[9660000] = 26124441544381LL;
  985.   a[9670000] = 26178527782839LL;
  986.   a[9680000] = 26232701884781LL;
  987.   a[9690000] = 26286939051225LL;
  988.   a[9700000] = 26341235745010LL;
  989.   a[9710000] = 26395576090617LL;
  990.   a[9720000] = 26449994103737LL;
  991.   a[9730000] = 26504426624404LL;
  992.   a[9740000] = 26558936152602LL;
  993.   a[9750000] = 26613514719621LL;
  994.   a[9760000] = 26668127238523LL;
  995.   a[9770000] = 26722806669831LL;
  996.   a[9780000] = 26777544721420LL;
  997.   a[9790000] = 26832314045156LL;
  998.   a[9800000] = 26887167816695LL;
  999.   a[9810000] = 26942070563606LL;
  1000.   a[9820000] = 26997033779094LL;
  1001.   a[9830000] = 27052029480865LL;
  1002.   a[9840000] = 27107105700706LL;
  1003.   a[9850000] = 27162221827195LL;
  1004.   a[9860000] = 27217402311172LL;
  1005.   a[9870000] = 27272653310076LL;
  1006.   a[9880000] = 27327930996167LL;
  1007.   a[9890000] = 27383260471065LL;
  1008.   a[9900000] = 27438685076016LL;
  1009.   a[9910000] = 27494133452253LL;
  1010.   a[9920000] = 27549659673320LL;
  1011.   a[9930000] = 27605216528279LL;
  1012.   a[9940000] = 27660849756651LL;
  1013.   a[9950000] = 27716526724780LL;
  1014.   a[9960000] = 27772267351746LL;
  1015.   a[9970000] = 27828040785351LL;
  1016.   a[9980000] = 27883895358158LL;
  1017.   a[9990000] = 27939811490658LL;
  1018.   a[10000000] = 27995776447498LL;
  1019.   int x, y;
  1020.   scanf("%d %d", &x, &y);
  1021.   for (int i = x / 10000 * 10000 + 1; i <= x; i++) {
  1022.     a[i] = a[i - 1] + f(i);
  1023.   }
  1024.   for (int i = y / 10000 * 10000 + 1; i <= y; i++) {
  1025.     a[i] = a[i - 1] + f(i);
  1026.   }
  1027.   printf("%lld\n", a[y] - a[x - 1]);
  1028.   return 0;
  1029. }
RAW Paste Data