Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

Re:总是wa,帮帮忙

Posted by sza at 2006-04-01 01:13:21 on Problem 2800
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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator