Search found 5 matches

by diego andres de barros
Sat Feb 24, 2007 12:23 am
Forum: Volume 6 (600-699)
Topic: 623 - 500!
Replies: 187
Views: 43506

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)...
by diego andres de barros
Wed Jul 26, 2006 11:57 pm
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 181676

instead of while (scanf("%ld %ld",&i,&j)!=EOF)

the correct is while (scanf("%ld %ld",&i,&j)==2)
by diego andres de barros
Fri Jul 21, 2006 5:39 am
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 181676

thaks for help me!!!!!!!!!!! :P
by diego andres de barros
Sun Jul 16, 2006 3:30 am
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 181676

my problems is wa.....
i believe the input is wrong.........
see ,please !!!!!!!!!
by diego andres de barros
Mon Jul 10, 2006 3:54 pm
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 181676

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...

Go to advanced search