QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#692804 | #9307. Clock Master | qinglu09# | WA | 3ms | 3948kb | C++23 | 25.3kb | 2024-10-31 15:04:03 | 2024-10-31 15:04:03 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long long LL;
typedef long double ld;
typedef pair<ll, ll> pll;
typedef pair<ll, ll> PLL;
#define endl '\n'
#define rep(i, a, b) for(ll i = (a); i <= (b); i++)
#define per(i, a, b) for(ll i = (a); i >= (b); i--)
const ll N = 30001;
#define debug(x) cout<<#x<<": "<<x<<endl
const ld eps = 1e-7;
ld o[1457]={0,0.6931472,1.0986123,1.3862944,1.7917595,2.4849067,2.7080502,3.4011974,4.0943446,4.6539604,4.7874917,5.3471075,6.0402547,6.7334019,7.1388670,7.7450028,7.8320142,8.4381500,9.1312972,9.5367623,9.6168050,10.2299095,10.3099522,11.0030993,11.6962465,12.1017116,12.7948588,13.1431655,13.8363127,14.5294599,14.9349250,15.6280722,16.0876045,16.3212193,16.7807517,17.4738988,17.8793640,18.5725111,19.2656583,19.9162459,20.6093931,21.0148582,21.7080054,22.4011525,22.6242961,22.8066176,23.2835417,23.3174433,23.9766889,24.3821540,25.0753012,25.7684484,25.9915919,26.1739135,26.6847391,26.7175289,27.4106761,27.8161412,28.5092884,29.2024356,29.4255791,29.6079007,30.1187263,30.3010479,30.3284468,30.8118735,31.0215940,31.4270591,32.1202063,32.8133535,33.0364970,33.2188186,33.7296442,33.9119658,34.4227914,34.7351661,35.1406312,35.8337784,36.5269255,36.7500691,36.9323907,37.4432163,37.6255378,38.1363635,38.4963662,38.5418286,38.9018313,39.5949785,40.2881257,40.5112692,40.6935908,41.2044164,41.3867379,41.8975636,42.3030287,42.3465138,42.7519789,42.9961759,43.4451261,44.1382733,44.3614168,44.5437384,45.0545640,45.2368855,45.7477112,46.1531763,46.4408584,46.8463235,47.4154180,48.1085652,48.3317087,48.5140303,49.0248559,49.2071775,49.7180031,50.1234682,50.4111503,50.8166154,51.4929554,51.5097626,52.1861026,52.4092462,52.5915677,53.1023934,53.2847149,53.7955405,54.2010056,54.4886877,54.8941528,54.9106821,55.6038293,56.2969765,56.5201200,56.7024416,57.2132672,57.3955888,57.9064144,58.3118795,58.5995616,59.0050267,59.6981739,59.8085219,59.8523245,60.5016691,60.7248127,60.9071342,61.4179598,61.6002814,62.1111070,62.5165721,62.8042542,63.2097193,63.9028665,64.0570172,64.0712018,64.7643490,64.9874925,65.1556295,65.1698141,65.6806397,65.8629613,66.3737869,66.7792520,67.0669341,67.4723992,68.1655464,68.3196970,68.3616612,68.7251621,69.0548084,69.4183093,69.4602735,69.9710992,70.1534207,70.6642463,71.0697114,71.3573935,71.7628586,72.4560058,72.6101565,72.7311091,73.0156216,73.3033037,73.4242563,73.7087688,73.8297214,74.3405470,74.4019160,74.5228686,75.0336942,75.4391593,75.7268414,76.1323065,76.8254537,76.9796043,77.3850694,77.6727515,78.0782166,78.2485620,78.7593876,78.7713638,78.9417092,79.4525348,79.8579999,80.1456820,80.5511471,81.2442943,81.3984449,81.8039101,82.0915921,82.4970572,83.1902044,83.2480240,83.4303455,83.9411712,84.3466363,84.6343183,85.0397835,85.7329306,85.8870813,86.2925464,86.5802285,86.9856936,87.6788408,87.8227350,88.0050565,88.5158821,88.9213472,89.2090293,89.6144944,90.3076416,90.4617923,90.8672574,91.1549395,91.5604046,92.2535518,92.4378555,92.6201770,93.1310027,93.5364678,93.8241498,94.2296149,94.9227621,95.0769128,95.4823779,95.7700600,96.1755251,96.8686723,97.0725845,97.2549060,97.7657316,98.1711968,98.4588788,98.8643439,99.5574911,99.7116418,100.1171069,100.4047890,100.8102541,101.5034013,101.7454133,101.9277349,102.4385605,102.8440256,103.1317077,103.5371728,104.2303200,104.3844706,104.7899357,105.0776178,105.4830829,106.1762301,106.4367612,106.6190827,106.8693773,107.1299084,107.5353735,107.8230555,108.2285207,108.9216678,109.0758185,109.4812836,109.7689657,110.1744308,110.8675780,111.1641490,111.5607252,111.8572962,112.2627613,112.5504434,112.9559085,113.6490557,113.8032063,114.2086714,114.4963535,114.9018186,115.5949658,116.2881130,116.7014833,117.1069484,117.3946304,117.8000956,118.4932427,118.6473934,119.0528585,119.3405406,119.7460057,120.4391529,121.1323001,121.5377652,121.5766806,121.9821457,122.2698278,122.6752929,123.3684401,123.5225907,123.9280558,124.2157379,124.6212030,125.3143502,126.0074974,126.4129625,126.4966615,126.9021266,127.1898087,127.5952738,128.2884210,128.4425717,128.8480368,129.1357188,129.5411840,130.2343311,130.9274783,131.3329434,131.4311355,131.8366006,132.1242826,132.5297477,133.2228949,133.3770456,133.7825107,134.0701928,134.4756579,135.1688051,135.8619523,136.2674174,136.4350818,136.8405469,136.9605645,137.1282289,137.5336940,138.2268412,138.3809919,138.7864570,139.0741391,139.4796042,140.1727514,140.8658986,141.2713637,141.4523616,141.8578267,141.9645108,142.1455088,142.5509739,143.2441211,143.3982717,143.8037369,144.0914189,144.4968840,145.1900312,145.8831784,146.2886435,146.5086074,146.9817907,147.2017546,147.6072197,148.3003669,148.4545175,148.8599827,149.1476647,149.5531298,150.2462770,150.9394242,151.3448893,152.0380365,152.2955048,152.7009699,153.3941171,153.5482677,153.9537329,154.2414149,154.6468800,155.3400272,156.0331744,156.4386395,157.1317867,157.4134986,157.8189637,158.5121109,158.6662616,159.0717267,159.3594087,159.7648738,160.4580210,161.1511682,161.5566333,162.2497805,162.2791081,162.8559163,162.9722553,163.6654025,163.8195532,164.2250183,164.5127003,164.9181654,165.6113126,166.3044598,166.7099249,167.4030721,168.0092079,168.1596411,168.8527883,169.0069390,169.4124041,169.7000861,170.1055512,170.7986984,171.4918456,171.8973107,172.5904579,173.1965937,173.3581381,174.0512853,174.2054360,174.6109011,174.8985832,175.3040483,175.9971955,176.6903426,177.0958078,177.7889549,178.3950907,178.6104116,179.0882379,179.3035587,179.4577094,179.4937030,179.8631745,180.1508566,180.5563217,181.2494689,181.9426161,182.3480812,183.0412284,183.6473642,183.8731017,184.3405113,184.5662489,184.7203996,184.7459765,185.1258647,185.4135468,185.8190119,186.5121591,187.2053063,187.6107714,188.3039185,188.9100544,189.1563055,189.6032015,189.8494527,190.0036033,190.0086666,190.4090684,190.6967505,191.1022156,191.7953628,192.4885100,192.8939751,193.5871223,194.1932581,194.4496103,194.8864053,195.1427575,195.2918704,195.2969082,195.7023733,195.9900553,196.3955205,197.0886676,197.7818148,198.1872799,198.8804271,199.4865629,200.1797101,200.5851752,200.6487663,201.0542314,201.3419135,201.7473786,202.4405258,203.1336729,203.5391381,204.2322852,204.8384210,205.5315682,205.9370333,206.0559381,206.6301805,206.7490852,207.1545504,207.8476975,208.5408447,208.9463098,209.6394570,210.2455928,210.9387400,211.3442051,211.4808881,212.0373523,212.1740353,212.5795004,213.2726476,213.9657947,214.3712598,215.0644070,215.6705428,216.3636900,216.7691551,216.9146101,217.4623023,217.6077573,218.0132224,218.7063696,219.3995167,219.8049818,220.4981290,221.1042648,221.7974120,222.2028771,222.2114979,222.8960243,223.0587957,223.4642608,224.1574080,224.8505552,225.2560203,225.9491675,226.5553033,227.2484505,227.6539156,228.3470628,228.5352593,228.9407244,229.6338716,230.3270187,230.7324839,231.4256310,232.0317668,232.7249140,233.1303791,233.8235263,234.0200562,234.4255213,235.1186685,235.8118157,236.2172808,236.9104280,237.5165638,238.2097110,238.6151761,239.3083232,239.5455091,239.9509743,240.6441214,241.3372686,241.7427337,242.4358809,243.0420167,243.7351639,244.1406290,244.8337762,245.0945852,245.5000503,246.1931975,246.8863447,247.2918098,247.9849570,248.5910928,249.2842400,249.6897051,250.3828523,250.8936779,251.0722044,251.0759994,251.7653516,252.4584987,252.8639638,253.5571110,254.1632468,254.8563940,255.2618591,255.9550063,256.4658319,256.6669158,256.8712970,257.3600629,257.5644442,258.0532101,258.4586752,258.5199557,259.1518224,259.7579582,260.4511054,260.8565705,261.5497177,262.0605433,262.2690346,262.4660084,262.9621818,263.1591556,263.6553289,264.0607940,264.1146670,264.7539412,265.3600770,266.0532242,266.4586893,267.1518365,267.6626621,267.8449837,267.8930521,268.0681272,268.5861993,268.7612744,269.2793464,269.6848115,269.7167859,270.3779587,270.9840945,271.6772417,272.0827068,272.7758540,273.2866796,273.4690012,273.6921447,274.2245539,274.3852919,274.9177011,275.3231662,275.3408034,276.0163134,276.6224492,277.3155964,277.7210615,278.4142087,278.9250343,279.1073559,279.3304994,279.8700008,280.0236466,280.5631480,280.9686131,280.9791580,281.6617603,282.2678961,282.9610433,283.3665084,284.0596556,284.5704812,284.7528028,284.9759463,285.5501734,285.6690935,285.9314577,286.2433206,286.6487857,287.3419329,287.9480687,288.6412159,289.0466810,289.7398282,290.2506538,290.4329754,290.6561189,291.3492661,291.6116304,291.9701684,292.3047775,292.3756335,293.0687807,293.6749165,294.3680636,294.7735287,295.4666759,295.9775015,296.1598231,296.3829667,297.0761138,297.3384781,297.7099613,298.0316253,298.1154264,298.8085736,298.9479160,299.4147094,299.6410632,300.1078566,300.5133217,301.2064688,301.7172945,301.8996160,302.1227596,302.8159068,303.0782710,303.4561645,303.7714182,303.8616296,304.2822438,304.5547768,304.6877089,305.1609126,305.3808561,305.8540597,306.2595248,306.9526720,307.4634977,307.6458192,307.8689628,308.5621099,308.8244742,309.2150662,309.5176214,309.6205313,310.0284470,310.3136785,310.4339121,310.9198143,311.1270593,311.6129615,312.0184266,312.7115738,313.2223994,313.4047210,313.6278645,314.3210117,314.5833760,315.2765232,315.4226497,315.7873488,315.9696703,316.1157969,316.1928139,316.7219327,316.8859611,317.4150799,317.8205450,318.5136922,319.0245178,319.2068394,319.4299829,320.1231301,320.3854944,321.0786415,321.2427327,321.5894672,321.7717887,321.9949323,322.5420156,322.6880794,323.2351628,323.6406279,324.3337751,324.8446007,325.0269223,325.2500658,325.9432130,326.2055773,326.8987245,327.4095501,327.5918716,327.8150152,328.5081624,329.0844876,329.4899527,330.1830999,330.6939255,330.8762471,331.0993906,331.7925378,332.0549021,332.7480492,333.2588749,333.4411964,333.6643400,334.3574872,334.9395595,335.3450246,336.0381718,336.5489974,336.7313190,336.9544625,337.6476097,337.9099740,338.6031212,339.1139468,339.2962683,339.5194119,340.2125591,340.8060276,340.9057063,341.2114927,341.9046399,342.4154655,342.5977870,342.8209306,343.5140778,343.7764420,344.4695892,344.9804148,345.1627364,345.3858800,345.3900670,346.0790271,346.6893500,346.7721743,347.0948151,347.7879623,348.2987879,348.4811094,348.7042530,349.3974002,349.6597644,350.3529116,350.8637372,351.0460588,351.2692023,351.9623495,352.5947118,352.6554967,353.0001769,353.6933241,354.2041497,354.3864713,354.6096148,355.3027620,355.5651263,356.2582735,356.7690991,356.9514206,357.1745642,357.8677114,358.5162902,358.5608586,358.9217553,359.6149025,360.1257281,360.3080497,360.5311933,361.2243404,361.4867047,362.1798519,362.6906775,362.8729991,363.0961426,363.7892898,364.4824370,364.8592915,365.5524387,366.0632644,366.2455859,366.4687295,367.1618766,367.4242409,368.1173881,368.6282137,368.8105353,369.0336788,369.7268260,370.4199732,370.8073265,371.5004737,372.0112993,372.1936209,372.4167645,373.1099116,373.3722759,374.0654231,374.5762487,374.7585703,374.9817138,375.6748610,376.3680082,376.7709059,377.4640531,377.9748787,378.1572002,378.3803438,379.0734910,379.3358552,380.0290024,380.5398280,380.7221496,380.9452932,381.6384403,381.6562299,382.3315875,382.3493771,382.7548422,383.4479893,383.9588150,384.1411365,384.3642801,385.0574273,385.3197915,386.0129387,386.5237643,386.7060859,386.9292294,387.6223766,387.6501913,388.3155238,388.3433385,388.7488036,389.4419508,389.9527764,390.1350979,390.3582415,391.0513887,391.3137529,392.0069001,392.5177258,392.7000473,392.9231909,393.6163380,394.3094852,394.3570536,394.7625187,395.4556659,395.9664915,396.1488131,396.3719567,397.0651038,397.3274681,398.0206153,398.5314409,398.7137625,398.9369060,399.6300532,400.3232004,400.3949246,400.8003897,401.4935368,402.0043625,402.1866840,402.4098276,403.1029748,403.3653390,404.0584862,404.5693118,404.7516334,404.9747769,405.6679241,406.3610713,406.4375574,406.8430225,407.5361697,408.0469953,408.2293169,408.4524604,409.1456076,409.4079719,410.1011190,410.6119447,410.7942662,411.0174098,411.7105569,412.4037041,412.5036655,412.9091306,412.9343324,413.6022778,414.1131034,414.2954249,414.5185685,414.5437703,415.2117157,415.4740799,416.1672271,416.6780528,416.8603743,417.0835179,417.7766650,418.4698122,418.5744032,418.9798683,419.0004405,419.6730155,420.1838411,420.3661627,420.5893062,420.6098784,421.2824534,421.5448177,422.2379649,422.7487905,422.9311120,423.1542556,423.8474028,424.5405499,424.6589026,425.0643677,425.0711782,425.7575149,426.2683405,426.4506621,426.6738056,426.6806161,427.3669528,427.6293171,428.3224643,428.8332899,429.0156114,429.2387550,429.9319022,430.6250494,430.7524724,431.1579375,431.8510847,432.3619103,432.5442319,432.7673754,433.4605226,433.7228869,434.4160340,434.9268597,435.1091812,435.3323248,436.0254719,436.7186191,436.8594953,437.2649604,437.4117663,437.9581076,438.4689332,438.6512547,438.8743983,439.5675455,439.8299097,440.5230569,441.0338825,441.2162041,441.4393477,442.1324948,442.8256420,442.9841787,443.2311071,443.3896438,443.5187892,444.0827910,444.2725610,444.5936166,444.7759381,444.9990817,445.6922289,445.9545931,446.6477403,447.1585659,447.3408875,447.5640310,448.2571782,448.9503254,449.1175767,449.3557905,449.4809537,449.5230418,449.6434726,450.2161890,450.3972444,450.7270146,450.9093362,451.0903916,451.1324797,451.8256269,452.0879912,452.7811384,453.2919640,453.4742855,453.6974291,454.3905763,455.0837235,455.2553038,455.4891886,455.6143517,455.6607689,455.7768706,456.3539161,456.5306424,456.8647417,457.0470632,457.2237896,457.2702068,457.9633540,458.2257182,458.9188654,459.4296910,459.6120126,459.8351561,460.5283033,461.2214505,461.4016330,461.6269156,461.7520788,461.8070981,461.9145977,462.5002453,462.6683695,463.0110709,463.3615167,463.4165360,464.1096832,464.3720475,465.0651947,465.5760203,465.7583419,465.9814854,466.6746326,467.3677798,467.7732449,467.8984080,467.9787987,468.0609269,468.4092336,468.6719459,468.8146987,469.1827715,469.5078459,469.5882366,470.2813838,470.5437481,471.2368953,471.7477209,471.9300424,472.1531860,472.8463332,473.5394804,473.9449455,474.0701086,474.2326275,474.5809342,474.6380926,474.8602100,474.9863993,475.6795465,475.7765008,476.4696479,476.7320122,477.4251594,477.9359850,478.1183066,478.3414501,479.0345973,479.7277445,480.1332096,480.2583727,480.4208917,480.7691984,480.8263568,481.0566542,481.1746635,481.8678106,481.9729449,482.6660921,482.9284563,483.6216035,484.1324291,484.3147507,484.5378943,485.2310414,485.9241886,486.3296537,486.4548169,486.6173358,486.9656425,487.0228009,487.1479640,487.3711076,488.0642548,488.1855510,488.7574020,488.8786982,489.1410624,489.8342096,490.3450352,490.5273568,490.7505003,491.4436475,492.1367947,492.5422598,492.6674230,492.8299419,493.1782486,493.2354070,493.3605701,493.5837137,494.2768609,494.4061412,494.9700081,495.0992883,495.3616526,496.0547998,496.5656254,496.7479470,496.9710905,497.6642377,498.3573849,498.7628500,498.8880131,499.0505321,499.3988388,499.4559972,499.5811603,499.8043039,500.4974510,500.6385892,501.1905982,501.3317364,501.5941006,502.2872478,502.7980734,502.9803950,503.2035385,503.8966857,504.5898329,504.9952980,505.1204611,505.2829801,505.6312868,505.6884452,505.8136083,506.0367519,506.7298991,506.8943392,507.4230462,507.5874864,507.8498507,508.5429978,509.0538235,509.2361450,509.4592886,510.1524358,510.8455829,511.2510480,511.3762112,511.5387301,511.8870368,511.9441952,512.0693584,512.2925019,512.9856491,513.1539207,513.6787963,513.8470679,514.1094321,514.8025793,515.3134049,515.4957265,515.7188700,516.4120172,517.1051644,517.5106295,517.6357927,517.7983116,518.1466183,518.2037767,518.3289398,518.5520834,519.2452306,519.9383777,520.1404871,520.4028514,521.0959986,521.6068242,521.7891458,522.0122893,522.7054365,523.3985837,523.8040488,523.9292119,524.0917309,524.4400376,524.4971960,524.6223591,524.8455027,525.5386498,526.2317970,526.4449359,526.7073002,527.4004474,527.9112730,528.0935946,528.3167381,529.0098853,529.7030325,530.1084976,530.2336607,530.3961797,530.7444864,530.8016448,530.9268079,531.1499515,531.8430986,532.5362458,532.7675012,533.0298654,533.7230126,534.2338383,534.4161598,534.6393034,535.3324505,536.0255977,536.4310628,536.5562260,536.7187449,537.0670516,537.1242100,537.2493732,537.4725167,538.1656639,538.8588111,538.9700367,539.1007808,539.3631451,540.0562923,540.5671179,540.7494394,540.9725830,541.6657302,542.3588773,542.7643425,542.8895056,543.0520245,543.4003312,543.4574896,543.5826528,543.8057963,544.4989435,545.1920907,545.3033163,545.4446612,545.5975558,545.7070255,545.8852379,546.4001727,546.9109983,547.0933199,547.3164634,548.0096106,548.7027578,549.1082229,549.2333860,549.3959050,549.7442117,549.8013701,549.9265332,550.1496768,550.8428239,551.5359711,551.6471968,551.7920505,551.9414362,552.0544147,552.2291183,552.7475619,553.2583875,553.4407091,553.6638526,554.3569998,555.0501470,555.4556121,555.5807752,555.7432942,556.0916009,556.1487593,556.2739224,556.4970660,557.1902132,557.8833603,557.9945860,558.1498927,558.2888254,558.4122570,558.5765075,559.1054042,559.6162298,559.7985513,560.0216949,560.7148421,561.4079893,561.8134544,561.9386175,562.1011364,562.4494431,562.5066015,562.6317647,562.8549082,563.5480554,564.2412026,564.3524282,564.5249175,564.6466677,564.7872818,564.9343498,565.4804290,565.9912546,566.1735762,566.3967197,567.0898669,567.7830141,568.1884792,568.3136423,568.4761613,568.8244680,568.8816264,569.0067895,569.2299331,569.9230802,570.6162274,570.7274531,571.0216925,571.1724762,571.3093746,571.8656234,572.3764490,572.5587706,572.7819141,573.4750613,574.1682085,574.5736736,574.6988367,574.8613557,575.2096624,575.2668208,575.3919839,575.6151275,576.3082746,577.0014218,577.1126475,577.4068869,577.6945690,578.1000341,578.2608850,578.7717106,578.9540322,579.1771757,579.8703229,580.5634701};
ll path[1457]={0,2,3,4,5,7,8,10,12,15,16,17,19,23,25,28,29,30,34,36,39,40,41,43,47,49,53,58,60,64,66,70,77,78,79,83,85,89,97,102,106,108,112,120,128,130,131,132,135,137,141,149,157,159,161,162,166,168,172,180,188,190,192,198,199,200,203,205,209,217,225,227,229,235,237,244,246,250,258,266,268,270,276,278,287,288,289,293,301,309,311,313,319,321,331,334,336,339,340,348,356,358,360,366,368,378,384,386,393,401,409,411,413,419,421,431,437,439,452,455,460,468,470,472,478,480,490,496,498,509,513,521,529,531,533,539,541,551,557,559,575,580,583,588,596,598,600,606,608,618,624,626,642,650,651,659,667,668,669,671,677,679,689,695,697,713,721,724,731,732,739,742,744,750,752,762,768,770,786,794,803,804,810,811,812,821,823,828,829,831,841,847,849,865,873,883,889,891,904,906,907,912,914,924,930,932,948,956,966,972,974,990,995,1001,1003,1013,1019,1021,1037,1045,1055,1061,1063,1079,1092,1098,1100,1110,1116,1118,1134,1142,1152,1158,1160,1176,1193,1199,1201,1211,1217,1219,1235,1243,1253,1259,1261,1277,1296,1302,1304,1314,1320,1322,1338,1346,1356,1362,1364,1380,1403,1409,1411,1421,1427,1429,1445,1453,1463,1469,1471,1487,1512,1518,1519,1520,1530,1536,1538,1554,1562,1572,1578,1580,1596,1625,1628,1633,1643,1649,1651,1667,1675,1685,1691,1693,1709,1741,1760,1770,1776,1778,1794,1802,1812,1818,1820,1836,1868,1890,1891,1901,1907,1909,1925,1933,1943,1949,1951,1967,1999,2021,2028,2038,2044,2046,2062,2070,2080,2086,2088,2104,2136,2158,2167,2177,2183,2185,2201,2209,2219,2225,2227,2243,2275,2297,2316,2326,2329,2332,2334,2350,2358,2368,2374,2376,2392,2424,2446,2467,2477,2478,2483,2485,2501,2509,2519,2525,2527,2543,2575,2597,2624,2629,2640,2642,2658,2666,2676,2682,2684,2700,2732,2754,2786,2803,2805,2821,2829,2839,2845,2847,2863,2895,2917,2949,2970,2972,2988,2996,3006,3012,3014,3030,3062,3084,3116,3137,3140,3145,3161,3169,3179,3185,3187,3203,3235,3257,3289,3313,3324,3340,3348,3358,3364,3366,3382,3414,3436,3468,3492,3505,3521,3529,3539,3545,3547,3563,3595,3617,3649,3673,3696,3705,3712,3720,3727,3730,3736,3738,3754,3786,3808,3840,3864,3889,3896,3905,3913,3918,3923,3929,3931,3947,3979,4001,4033,4057,4086,4089,4102,4110,4111,4120,4126,4128,4144,4176,4198,4230,4254,4285,4286,4301,4308,4309,4319,4325,4327,4343,4375,4397,4429,4453,4485,4507,4520,4530,4536,4538,4554,4586,4608,4640,4664,4696,4718,4743,4750,4759,4761,4777,4809,4831,4863,4887,4919,4941,4970,4973,4986,4988,5004,5036,5058,5090,5114,5146,5168,5199,5200,5215,5217,5233,5265,5287,5319,5343,5375,5397,5424,5429,5448,5450,5466,5498,5520,5552,5576,5608,5630,5662,5687,5689,5705,5737,5759,5791,5815,5847,5869,5901,5928,5930,5946,5978,6000,6032,6056,6088,6110,6142,6179,6181,6197,6229,6251,6283,6307,6339,6361,6393,6436,6438,6454,6486,6508,6540,6564,6596,6618,6650,6696,6701,6714,6717,6749,6771,6803,6827,6859,6881,6913,6959,6970,6981,6986,7013,7018,7040,7069,7072,7096,7128,7150,7182,7228,7241,7250,7257,7282,7289,7311,7338,7343,7367,7399,7421,7453,7499,7517,7518,7521,7534,7553,7566,7588,7609,7620,7644,7676,7698,7730,7776,7794,7798,7815,7830,7847,7869,7886,7901,7925,7957,7979,8011,8057,8075,8079,8098,8111,8130,8152,8167,8184,8208,8240,8262,8294,8340,8358,8362,8391,8394,8418,8423,8445,8477,8501,8533,8555,8587,8633,8651,8655,8687,8711,8730,8743,8752,8784,8808,8840,8862,8894,8940,8958,8962,8994,9018,9041,9050,9063,9095,9118,9119,9150,9151,9173,9205,9251,9269,9273,9305,9329,9354,9361,9376,9407,9408,9429,9432,9461,9464,9486,9518,9564,9582,9586,9618,9642,9671,9674,9693,9720,9725,9742,9749,9774,9781,9803,9835,9881,9899,9903,9935,9959,9991,10024,10037,10055,10056,10059,10080,10091,10112,10134,10166,10212,10230,10234,10266,10290,10322,10361,10368,10386,10390,10417,10422,10449,10471,10503,10549,10567,10571,10603,10627,10659,10705,10723,10727,10759,10796,10818,10850,10896,10914,10918,10950,10974,11006,11052,11070,11074,11106,11145,11167,11199,11245,11263,11267,11299,11323,11355,11401,11419,11423,11455,11498,11519,11520,11552,11598,11616,11620,11652,11676,11708,11754,11772,11776,11801,11808,11857,11872,11879,11911,11957,11975,11979,12011,12035,12067,12113,12131,12135,12167,12224,12231,12246,12278,12324,12342,12346,12378,12402,12434,12480,12498,12502,12534,12597,12598,12619,12651,12697,12715,12719,12751,12775,12807,12853,12871,12875,12907,12971,12998,13030,13076,13094,13098,13130,13154,13186,13232,13250,13254,13286,13350,13381,13413,13459,13477,13481,13513,13537,13569,13615,13633,13637,13669,13733,13770,13802,13848,13866,13870,13902,13926,13958,14004,14022,14026,14058,14113,14122,14145,14167,14199,14245,14263,14267,14299,14323,14355,14401,14419,14423,14455,14514,14519,14546,14568,14600,14646,14664,14668,14700,14724,14756,14802,14820,14824,14856,14920,14955,14977,15009,15055,15073,15077,15109,15133,15165,15211,15229,15233,15265,15329,15374,15396,15428,15474,15492,15496,15528,15552,15584,15630,15648,15652,15684,15748,15795,15817,15849,15895,15913,15917,15949,15973,16005,16051,16069,16073,16105,16169,16226,16248,16277,16280,16326,16344,16348,16377,16380,16404,16436,16482,16500,16504,16536,16600,16659,16681,16708,16713,16759,16777,16781,16808,16813,16837,16869,16915,16933,16937,16969,17033,17098,17120,17141,17152,17198,17216,17220,17241,17252,17276,17308,17354,17372,17376,17408,17472,17541,17563,17595,17641,17659,17663,17695,17719,17751,17797,17815,17819,17851,17915,17990,18012,18043,18044,18090,18108,18112,18144,18168,18200,18246,18264,18268,18300,18364,18447,18462,18469,18492,18501,18540,18547,18565,18569,18601,18625,18657,18703,18721,18725,18757,18821,18908,18919,18929,18930,18949,18962,18997,19008,19026,19029,19030,19062,19086,19118,19164,19182,19186,19218,19282,19371,19380,19390,19393,19410,19425,19458,19471,19489,19490,19493,19525,19549,19581,19627,19645,19649,19681,19745,19838,19843,19853,19860,19873,19892,19921,19938,19953,19960,19992,20016,20048,20094,20112,20116,20148,20212,20310,20320,20339,20340,20366,20371,20388,20417,20420,20439,20471,20495,20527,20573,20591,20595,20627,20691,20789,20799,20819,20845,20853,20858,20867,20899,20926,20958,20982,21014,21060,21078,21082,21114,21178,21276,21286,21306,21332,21340,21349,21354,21386,21417,21449,21473,21505,21551,21569,21573,21605,21669,21767,21777,21797,21823,21831,21841,21845,21877,21916,21941,21948,21972,22004,22050,22068,22072,22104,22168,22266,22276,22296,22322,22330,22340,22344,22376,22419,22440,22451,22475,22507,22553,22571,22575,22607,22671,22769,22779,22799,22825,22833,22843,22847,22879,22928,22943,22960,22984,23016,23062,23080,23084,23116,23180,23278,23288,23308,23334,23342,23352,23356,23388,23449,23452,23481,23505,23537,23583,23601,23605,23637,23701,23799,23809,23829,23855,23863,23873,23877,23909,23972,23973,24004,24028,24060,24106,24124,24128,24160,24224,24322,24332,24352,24378,24386,24396,24400,24432,24496,24545,24569,24601,24647,24665,24669,24701,24765,24863,24873,24893,24919,24927,24937,24941,24973,25037,25092,25116,25148,25194,25212,25216,25248,25312,25410,25420,25440,25466,25474,25484,25488,25520,25584,25649,25673,25705,25751,25769,25773,25805,25869,25967,25977,25997,26023,26031,26041,26045,26077,26141,26211,26212,26236,26268,26314,26332,26336,26368,26432,26530,26540,26560,26586,26594,26604,26608,26640,26704,26774,26781,26802,26805,26832,26837,26883,26901,26905,26937,27001,27099,27109,27129,27155,27163,27173,27177,27209,27273,27343,27352,27371,27376,27401,27408,27454,27472,27476,27508,27572,27670,27680,27700,27726,27734,27744,27748,27780,27844,27914,27929,27942,27953,27972,27985,28031,28049,28053,28085,28149,28247,28257,28277,28303,28311,28321,28325,28357,28421,28491,28516,28519,28540,28549,28572,28618,28636,28640,28672,28736,28834,28844,28864,28890,28898,28908,28912,28944,29008,29078,29106,29133,29136,29165,29211,29229,29233,29265,29329,29427,29437,29457,29483,29491,29501,29505,29537,29601,29671,29699,29729,29763,29764,29810,29828,29832,29864,29928};
void solve()
{
int x;
cin>>x;
for(int i=0;i<1457;i++)
{
if(x>=path[i] && (i == 1456 || x < path[i + 1]))
{
cout<<fixed<<setprecision(7)<<o[i]<<endl;
return;
}
}
}
int main()
{
// #ifndef ONLINE_JUDGE
// freopen("test.in","r",stdin);
// freopen("test.out","w",stdout);
// #endif
ios::sync_with_stdio(0);
cin.tie(0),cout.tie(0);
ll T=1;
cin>>T;
while(T--)
{
solve();
}
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3924kb
input:
3 2 7 10
output:
0.6931472 2.4849067 3.4011974
result:
ok 3 numbers
Test #2:
score: -100
Wrong Answer
time: 3ms
memory: 3948kb
input:
5000 580 4555 4654 1420 53 1076 1226 2733 2285 348 2104 2293 3447 4208 710 307 1763 1142 3027 2151 3182 1546 3398 867 2380 830 4211 3117 3058 2251 1890 3961 4003 3991 4167 4976 1765 3235 2644 4070 4644 3645 875 3005 4769 4934 3846 2941 255 946 4164 1372 1193 3056 4472 508 3949 2473 4490 88 4014 2953...
output:
59.8085219 202.4405258 204.2322852 102.4385605 12.7948588 86.9856936 94.2296149 150.9394242 135.8619523 44.1382733 130.2343311 135.8619523 171.8973107 192.8939751 67.4723992 40.2881257 116.7014833 90.4617923 159.7648738 130.9274783 164.2250183 108.2285207 170.7986984 76.8254537 139.4796042 74.522868...
result:
wrong answer 3rd numbers differ - expected: '204.2875989', found: '204.2322852', error = '0.0002708'