結果
問題 | No.262 面白くないビットすごろく |
ユーザー | ciel |
提出日時 | 2015-08-01 02:21:31 |
言語 | C90 (gcc 11.4.0) |
結果 |
AC
|
実行時間 | 481 ms / 2,000 ms |
コード長 | 14,594 bytes |
コンパイル時間 | 245 ms |
コンパイル使用メモリ | 20,992 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-18 00:20:49 |
合計ジャッジ時間 | 1,666 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
6,816 KB |
testcase_01 | AC | 481 ms
6,944 KB |
testcase_02 | AC | 0 ms
6,944 KB |
testcase_03 | AC | 477 ms
6,940 KB |
コンパイルメッセージ
main.c: In function ‘main’: main.c:524:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 524 | scanf("%lld",&T); | ^~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h> long long A[][2]={ {1,1}, {1469980661,100000000}, {3043866194,200000000}, {4668805397,300000000}, {6304910356,400000000}, {7993963829,500000000}, {9642632542,600000000}, {11294354928,700000000}, {13027785723,800000000}, {14738125619,900000000}, {16528261358,1000000000}, {18210846365,1100000000}, {19866093995,1200000000}, {21598491410,1300000000}, {23305273520,1400000000}, {25096174476,1500000000}, {26851772357,1600000000}, {28602397028,1700000000}, {30427698850,1800000000}, {32270214628,1900000000}, {34179892617,2000000000}, {35795799199,2100000000}, {37474898914,2200000000}, {39197471635,2300000000}, {40939570388,2400000000}, {42754518110,2500000000}, {44462028961,2600000000}, {46246138672,2700000000}, {48061009280,2800000000}, {49915842567,2900000000}, {51804505746,3000000000}, {53529119430,3100000000}, {55324780514,3200000000}, {57133697987,3300000000}, {59013445723,3400000000}, {60879847534,3500000000}, {62731107711,3600000000}, {64657845620,3700000000}, {66594902230,3800000000}, {68606219945,3900000000}, {70213317053,4000000000}, {71896995155,4100000000}, {73611431518,4200000000}, {75356721983,4300000000}, {77182126867,4400000000}, {78884623026,4500000000}, {80667255466,4600000000}, {82482422714,4700000000}, {84337635794,4800000000}, {86217961282,4900000000}, {87953309922,5000000000}, {89746820648,5100000000}, {91556662124,5200000000}, {93439998073,5300000000}, {95303593650,5400000000}, {97158013902,5500000000}, {99080204098,5600000000}, {101016865944,5700000000}, {103042167164,5800000000}, {104735939605,5900000000}, {106520038443,6000000000}, {108339020445,6100000000}, {110194551888,6200000000}, {112090962902,6300000000}, {113932646949,6400000000}, {115853066762,6500000000}, {117756428320,6600000000}, {119756595279,6700000000}, {121611143221,6800000000}, {123494368489,6900000000}, {125404818549,7000000000}, {127360339040,7100000000}, {129354551798,7200000000}, {131294634743,7300000000}, {133318905954,7400000000}, {135350966210,7500000000}, {137462808107,7600000000}, {139052375600,7700000000}, {140732668131,7800000000}, {142445346045,7900000000}, {144194746378,8000000000}, {146037422426,8100000000}, {147724195489,8200000000}, {149512054388,8300000000}, {151331584259,8400000000}, {153185209635,8500000000}, {155051645104,8600000000}, {156798952093,8700000000}, {158596635922,8800000000}, {160402984610,8900000000}, {162286550775,9000000000}, {164149606177,9100000000}, {166003338810,9200000000}, {167926774490,9300000000}, {169866379974,9400000000}, {171876516813,9500000000}, {173576727157,9600000000}, {175365124310,9700000000}, {177188326745,9800000000}, {179046824732,9900000000}, {180935812820,10000000000}, {182776411106,10100000000}, {184711441692,10200000000}, {186615413466,10300000000}, {188617425837,10400000000}, {190457184784,10500000000}, {192340450167,10600000000}, {194259404522,10700000000}, {196219122498,10800000000}, {198200809847,10900000000}, {200148332563,11000000000}, {202170968402,11100000000}, {204206289190,11200000000}, {206291552292,11300000000}, {207999147165,11400000000}, {209789717153,11500000000}, {211606934829,11600000000}, {213471105746,11700000000}, {215354169160,11800000000}, {217198961212,11900000000}, {219130300515,12000000000}, {221046311006,12100000000}, {223051245640,12200000000}, {224881948270,12300000000}, {226765329931,12400000000}, {228690056588,12500000000}, {230647419390,12600000000}, {232625258753,12700000000}, {234578074818,12800000000}, {236597532711,12900000000}, {238637796451,13000000000}, {240718182563,13100000000}, {242543758152,13200000000}, {244441961617,13300000000}, {246354023479,13400000000}, {248340289555,13500000000}, {250293791169,13600000000}, {252267865221,13700000000}, {254282368786,13800000000}, {256342539952,13900000000}, {258381856228,14000000000}, {260332956422,14100000000}, {262353169338,14200000000}, {264392085322,14300000000}, {266499308715,14400000000}, {268531551848,14500000000}, {270653190645,14600000000}, {272777094965,14700000000}, {274954969314,14800000000}, {276550885590,14900000000}, {278235349275,15000000000}, {279949996534,15100000000}, {281699656501,15200000000}, {283532815970,15300000000}, {285230291468,15400000000}, {287018460831,15500000000}, {288843338514,15600000000}, {290697914197,15700000000}, {292555622117,15800000000}, {294299027617,15900000000}, {296108809315,16000000000}, {297913802561,16100000000}, {299797478086,16200000000}, {301659455396,16300000000}, {303513296406,16400000000}, {305438074414,16500000000}, {307378730096,16600000000}, {309375584135,16700000000}, {311084691327,16800000000}, {312874881362,16900000000}, {314691888304,17000000000}, {316556574437,17100000000}, {318438834114,17200000000}, {320283900442,17300000000}, {322215373216,17400000000}, {324132816415,17500000000}, {326137829776,17600000000}, {327967124378,17700000000}, {329850743215,17800000000}, {331776265096,17900000000}, {333733585550,18000000000}, {335710857845,18100000000}, {337664008995,18200000000}, {339683323413,18300000000}, {341723231844,18400000000}, {343789429897,18500000000}, {345507238647,18600000000}, {347300064331,18700000000}, {349113030826,18800000000}, {350984406120,18900000000}, {352860264722,19000000000}, {354707032535,19100000000}, {356636401269,19200000000}, {358564384518,19300000000}, {360569937165,19400000000}, {362394197631,19500000000}, {364277970837,19600000000}, {366198335826,19700000000}, {368164629305,19800000000}, {370136993378,19900000000}, {372090932234,20000000000}, {374111296919,20100000000}, {376151464681,20200000000}, {378224220940,20300000000}, {380058390854,20400000000}, {381957669986,20500000000}, {383870119622,20600000000}, {385856452136,20700000000}, {387803833086,20800000000}, {389785718940,20900000000}, {391799556527,21000000000}, {393861322082,21100000000}, {395892667645,21200000000}, {397847294344,21300000000}, {399867029795,21400000000}, {401906744653,21500000000}, {404011963590,21600000000}, {406045283117,21700000000}, {408166458636,21800000000}, {410293988609,21900000000}, {412459892498,22000000000}, {414170300470,22100000000}, {415960418149,22200000000}, {417777139858,22300000000}, {419642241630,22400000000}, {421523913344,22500000000}, {423369329072,22600000000}, {425300867447,22700000000}, {427219090665,22800000000}, {429224980121,22900000000}, {431052902989,23000000000}, {432936691491,23100000000}, {434863107881,23200000000}, {436819529974,23300000000}, {438796401965,23400000000}, {440750473350,23500000000}, {442769590804,23600000000}, {444808941592,23700000000}, {446887863671,23800000000}, {448715363557,23900000000}, {450613672551,24000000000}, {452525875701,24100000000}, {454512303678,24200000000}, {456465371929,24300000000}, {458440607813,24400000000}, {460454459119,24500000000}, {462516131457,24600000000}, {464552796671,24700000000}, {466505438561,24800000000}, {468525009057,24900000000}, {470565134382,25000000000}, {472670820223,25100000000}, {474703374216,25200000000}, {476824486443,25300000000}, {478949396271,25400000000}, {481137046678,25500000000}, {482947439044,25600000000}, {484844914771,25700000000}, {486755371530,25800000000}, {488739231332,25900000000}, {490705646242,26000000000}, {492663323034,26100000000}, {494681424767,26200000000}, {496736570428,26300000000}, {498791098608,26400000000}, {500733994143,26500000000}, {502758835063,26600000000}, {504792318329,26700000000}, {506906580522,26800000000}, {508935069703,26900000000}, {511049943986,27000000000}, {513166144199,27100000000}, {515389888625,27200000000}, {517288857460,27300000000}, {519289749354,27400000000}, {521307331263,27500000000}, {523399099775,27600000000}, {525438600306,27700000000}, {527525826896,27800000000}, {529645152589,27900000000}, {531830142902,28000000000}, {533911179933,28100000000}, {535991669344,28200000000}, {538110881837,28300000000}, {540290279115,28400000000}, {542445766958,28500000000}, {544627454197,28600000000}, {546846436524,28700000000}, {549136811489,28800000000}, {550918245588,28900000000}, {552577704779,29000000000}, {554309590958,29100000000}, {556033975597,29200000000}, {557829972968,29300000000}, {559563840946,29400000000}, {561330089590,29500000000}, {563154351826,29600000000}, {564994400072,29700000000}, {566933008696,29800000000}, {568618071096,29900000000}, {570404156573,30000000000}, {572223399196,30100000000}, {574077826778,30200000000}, {575973613118,30300000000}, {577815644698,30400000000}, {579740475299,30500000000}, {581642857002,30600000000}, {583642878763,30700000000}, {585412682625,30800000000}, {587185448333,30900000000}, {589004843632,31000000000}, {590849466497,31100000000}, {592776838342,31200000000}, {594584205636,31300000000}, {596480632577,31400000000}, {598390213830,31500000000}, {600373164682,31600000000}, {602276789202,31700000000}, {604131558044,31800000000}, {606055535814,31900000000}, {607996922389,32000000000}, {610014086303,32100000000}, {611936152771,32200000000}, {613942070930,32300000000}, {615953831149,32400000000}, {618055837455,32500000000}, {619832855764,32600000000}, {621609731722,32700000000}, {623425191186,32800000000}, {625271673279,32900000000}, {627194398336,33000000000}, {629008378122,33100000000}, {630905954525,33200000000}, {632817224855,33300000000}, {634802011533,33400000000}, {636703471255,33500000000}, {638556986920,33600000000}, {640483343558,33700000000}, {642421663973,33800000000}, {644434745113,33900000000}, {646369655928,34000000000}, {648375252387,34100000000}, {650387040699,34200000000}, {652490864939,34300000000}, {654340820912,34400000000}, {656224576173,34500000000}, {658146134006,34600000000}, {660104803113,34700000000}, {662085614117,34800000000}, {664034735301,34900000000}, {666056469868,35000000000}, {668092915876,35100000000}, {670191528112,35200000000}, {672123851647,35300000000}, {674129434788,35400000000}, {676141175702,35500000000}, {678244658489,35600000000}, {680275412048,35700000000}, {682374196284,35800000000}, {684492287058,35900000000}, {686688081812,36000000000}, {688498052921,36100000000}, {690271265374,36200000000}, {692090271171,36300000000}, {693934884531,36400000000}, {695861454766,36500000000}, {697669335613,36600000000}, {699566093230,36700000000}, {701476114214,36800000000}, {703459014928,36900000000}, {705362572680,37000000000}, {707217077710,37100000000}, {709141524985,37200000000}, {711083438825,37300000000}, {713099812776,37400000000}, {715022516622,37500000000}, {717028460150,37600000000}, {719040292087,37700000000}, {721142705741,37800000000}, {723002026250,37900000000}, {724885629014,38000000000}, {726803561571,38100000000}, {728761045559,38200000000}, {730747568701,38300000000}, {732693287973,38400000000}, {734717019376,38500000000}, {736749758856,38600000000}, {738856174286,38700000000}, {740777465941,38800000000}, {742783307802,38900000000}, {744795165451,39000000000}, {746896572028,39100000000}, {748933922613,39200000000}, {751024346986,39300000000}, {753141880437,39400000000}, {755336643830,39500000000}, {757242843568,39600000000}, {759125818578,39700000000}, {761035892912,39800000000}, {762989904053,39900000000}, {764984543923,40000000000}, {766926219046,40100000000}, {768950249363,40200000000}, {770981663479,40300000000}, {773102984392,40400000000}, {775002836996,40500000000}, {777003979105,40600000000}, {779020939097,40700000000}, {781115568109,40800000000}, {783154062605,40900000000}, {785241482297,41000000000}, {787360097533,41100000000}, {789546215895,41200000000}, {791553252799,41300000000}, {793534166646,41400000000}, {795550462201,41500000000}, {797612465314,41600000000}, {799687356900,41700000000}, {801743227016,41800000000}, {803862443601,41900000000}, {806016345271,42000000000}, {808158770169,42100000000}, {810211805523,42200000000}, {812331967863,42300000000}, {814480115159,42400000000}, {816665287701,42500000000}, {818815284428,42600000000}, {821033071116,42700000000}, {823291446273,42800000000}, {825336664979,42900000000}, {827085965355,43000000000}, {828930392290,43100000000}, {830720144562,43200000000}, {832614810550,43300000000}, {834456466195,43400000000}, {836329001332,43500000000}, {838244378898,43600000000}, {840200563720,43700000000}, {842172566028,43800000000}, {844015127984,43900000000}, {845924301174,44000000000}, {847830932658,44100000000}, {849827622285,44200000000}, {851765990410,44300000000}, {853747688115,44400000000}, {855773169343,44500000000}, {857835952990,44600000000}, {859806361421,44700000000}, {861660536584,44800000000}, {863582897536,44900000000}, {865519592631,45000000000}, {867544389682,45100000000}, {869447143796,45200000000}, {871446393618,45300000000}, {873463619440,45400000000}, {875554302703,45500000000}, {877522802056,45600000000}, {879503038949,45700000000}, {881526923721,45800000000}, {883590032943,45900000000}, {885658701662,46000000000}, {887720236916,46100000000}, {889838183515,46200000000}, {891996345795,46300000000}, {894045653761,46400000000}, {895894981719,46500000000}, {897822674136,46600000000}, {899754550934,46700000000}, {901760199490,46800000000}, {903674751129,46900000000}, {905672137349,47000000000}, {907685190006,47100000000}, {909772129113,47200000000}, {911755883581,47300000000}, {913735370955,47400000000}, {915747908970,47500000000}, {917808707266,47600000000}, {919885714549,47700000000}, {921941106957,47800000000}, {924059753943,47900000000}, {926210825869,48000000000}, {928324426762,48100000000}, {930270736103,48200000000}, {932294263343,48300000000}, {934327743194,48400000000}, {936441420430,48500000000}, {938472256179,48600000000}, {940594928090,48700000000}, {942709938267,48800000000}, {944923194178,48900000000}, {946936098980,49000000000}, {949049123991,49100000000}, {951165540823,49200000000}, {953382717817,49300000000}, {955503787958,49400000000}, {957723191634,49500000000}, {959946162597,49600000000}, {962209863185,49700000000}, {964024768722,49800000000}, {965922590806,49900000000}, {967834326462,50000000000}, {969819285216,50100000000}, {971779514575,50200000000}, {973744656990,50300000000}, {975763287747,50400000000}, {977816739010,50500000000}, {979866439324,50600000000}, {981812882694,50700000000}, {983836311124,50800000000}, {985870025609,50900000000}, {987983393408,51000000000}, {990014429298,51100000000}, {992137825256,51200000000}, {994252783134,51300000000}, {996463258952,51400000000}, {998367757367,51500000000}, {1000369833402,51600000000}, }; int main(){ long long T,n,r; scanf("%lld",&T); int i=0; for(;A[i+1][0]<=T;i++); n=A[i][0],r=A[i][1]; for(;n<T;r++){ //if(r%100000000==0)printf("{%lld,%lld},\n",n,r); n+=__builtin_popcountll(n); } if(n==T)printf("%llu\n",r); else puts("-1"); return 0; }