| ||||||||||
| 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:总是wa,帮帮忙In Reply To:总是wa,帮帮忙 Posted by:sza at 2006-04-01 00:05:20 终于tmd过了!!
一直超时就是因为当n的规模不大时可以用遍历的方法。但是我的n给得太小了:
if(n<10){
for(i=1;i<=n;i++){
result+=k%i;
}
printf("%I64d\n",result);
}
改成n<1000左右就行了。
看来测试数据的分布可能不好。
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator