Search found 4 matches

by tinapon
Thu Mar 27, 2003 5:59 pm
Forum: Volume 103 (10300-10399)
Topic: 10375 - Choose and divide
Replies: 23
Views: 12096

Thanks you input ....... :D
by tinapon
Wed Mar 26, 2003 2:58 pm
Forum: Volume 103 (10300-10399)
Topic: 10375 - Choose and divide
Replies: 23
Views: 12096

I got Wa again. Can you give me some test data....... #include<stdio.h> #include<math.h> main() { double ans; int i; int max; int a, b, c, d; while(scanf("%d %d %d %d",&a,&b, &c, &d) == 4) { ans = 1; if(a > b / 2) b = a - b; if(c > d / 2) d = c - d; if(b > d ) max = b; else max = d; for(i = 0;i < ma...
by tinapon
Wed Mar 26, 2003 2:41 pm
Forum: Volume 102 (10200-10299)
Topic: 10236 - The Fibonacci Primes
Replies: 28
Views: 11960

10236 WA

:o I got WA.......... #include<stdio.h> #include <math.h> #define MAX 100 int pri[10001]; int pri_num; void prime() { int i, j; int na; int temp; pri[0] = 2; pri[1] = 3; pri_num = 2; for(i = 5;i <10000; i += 2) { na = 0; temp = (int)sqrt(i) + 1; for (j = 1; j < pri_num && pri[j] < temp; j++) { if(i ...
by tinapon
Tue Mar 25, 2003 5:23 pm
Forum: Volume 103 (10300-10399)
Topic: 10375 - Choose and divide
Replies: 23
Views: 12096

Re: 10375 help!

I got WA too...... what wrong with that........ :oops: #include<stdio.h> #include<math.h> main() { double ans; double ru[10001]; int i , j , min; int a, b, c, d; ru[0] = 0; ru[1] = 0; for(i = 2; i < 10001; i++) ru = ru + log10(i); while(scanf("%d %d %d %d",&a,&b, &c, &d) == 4) { ans = ru[a] - ru - r...

Go to advanced search