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 |
第二个超时是因为你犯了一个很马虎的错误In Reply To:TLE的程序 Posted by:mixter at 2006-09-16 18:33:46 > __int64 factpow(int n,int p) > { > if(ans[n][p]!=-1) return ans[n][p]; > __int64 d=0; > do > { > n /= p; // n值怎么能改变呢? > d += n; > }while(n); > ans[n][p]=d; // 这儿要用。 > return d; > } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator