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:怎么才能减少时间啊?500msIn Reply To:Re:怎么才能减少时间啊?500ms Posted by:xcl119xcl at 2007-07-27 11:38:22 打表啦,还能有啥办法 for(i = 1;i < 15;i ++) { N5[i] = 5 * N5[i-1]; } 然后 for(i = 1;n >= N5[i];i ++) result += n/N5[i]; 这样至多优化到100+ms,再好的优化代码就比较长了,啰嗦的代码一贯不写-_- Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator