| ||||||||||
| 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:哪位大哥看一下,为什么老compile errorIn Reply To:哪位大哥看一下,为什么老compile error Posted by:618907 at 2010-05-08 17:00:11 > #include<iostream>
> using namespace std;
> int sum(int n,int i)
>
> {
> int m,s=0;
> while(n>0)
> {
> m=n%i;
> n=n/i;
> s+=m;
> }
> return s;
> }
>
>
> void main()
> {
> int i,t;
> for(i=2992;i<10000;i++)
> {
> t=sum(i,10);
> if(t==sum(i,12)&&t==sum(i,16))
> cout<<i<<endl;
> }
> }
>
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator