Search found 5 matches
- Sat Feb 24, 2007 12:23 am
- Forum: Volume 6 (600-699)
- Topic: 623 - 500!
- Replies: 187
- Views: 43929
623
please.....where is the error in my input???? #include<stdio.h> #define MAX 10000 int m[MAX],pos,fix; const int fixo=1000000; int mul(int j); int main(void){ int n,i; while( scanf("%d",&n) ){ for(i=0;i<=MAX;i++)m =0; pos=0; m[0]=1; for(i=2;i<=n;i++){ m[0]*=i; fix =(m[0]/fixo); m[0]=m[0]%fixo; mul(i)...
- Wed Jul 26, 2006 11:57 pm
- Forum: Volume 1 (100-199)
- Topic: 100 - The 3n + 1 problem
- Replies: 1394
- Views: 183149
- Fri Jul 21, 2006 5:39 am
- Forum: Volume 1 (100-199)
- Topic: 100 - The 3n + 1 problem
- Replies: 1394
- Views: 183149
- Sun Jul 16, 2006 3:30 am
- Forum: Volume 1 (100-199)
- Topic: 100 - The 3n + 1 problem
- Replies: 1394
- Views: 183149
- Mon Jul 10, 2006 3:54 pm
- Forum: Volume 1 (100-199)
- Topic: 100 - The 3n + 1 problem
- Replies: 1394
- Views: 183149
100 !!!!! help me
the input is one one or with while..... what is wrong???????? #include<stdio.h> int main(){ long long int i=0,j=0,p,ma,me,k,x=0,y=0; while( scanf("%lld %lld",&i,&j) ){ if(i>=j){ ma=i; me=j; } else { ma=j; me=i; } p=me; for(;p<=ma;p++){ k=p; while(k>1){ if(!(k%2))k/=2; else k= 3*k+1; x++; } if(k==1)x...