|
|
вернуться в форумSome hints about "Digits" problem ;)) I have been accepted with time result 0.13 sec. so I do not show off but this is good result. I have written it in C++, but my idea is to jump with 9999 pages with these functions: void calc9999(void) { pArr[0]+=1104+2889+3;// ??? pArr[1]+=4000;pArr[2]+=4000;pArr[3]+=4000; pArr[4]+=4000;pArr[5]+=4000;pArr[6]+=4000; pArr[7]+=4000;pArr[8]+=4000;pArr[9]+=4000; } // the second is only at start!!! void calc1to9999(void) { pArr[0]+=2889; pArr[1]+=4000;pArr[2]+=4000;pArr[3]+=4000; pArr[4]+=4000;pArr[5]+=4000;pArr[6]+=4000; pArr[7]+=4000;pArr[8]+=4000;pArr[9]+=4000; } :)) I jump up to all pages if possible otherwise i use one by one page calculation. If pages are less than 10000 I use the same method. If some one got it type some thanks!!! Zahari Are you kidding??? Almost everybody who solved this problem got AC in less than 0.03 sec! Did you check out the problem statistics? Re: Some hints about "Digits" problem ;)) very cute idea! |
|
|