Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
Re:进位制思想~47msIn Reply To:进位制思想~47ms Posted by:wyc4662 at 2011-07-27 19:02:15 > const a:array[1..12] of longint=(5,25,125,625,3125,15625,78125,390625,1953125,9765625,48828125,244140625); > c:array[1..12] of longint=(1,6,31,156,781,3906,19531,97656,488281,2441406,12207031,61035156); > var i,j,n,m,l,t,k:longint; > begin > readln(m); > for l:=1 to m do begin > t:=0; > readln(n); > for i:=12 downto 1 do > while n>=a[i] do begin t:=t+c[i]; n:=n-a[i]; end; > writeln(t); > end; > end. > > 求大牛们的16ms做法 Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator