Search found 4 matches

by shines
Tue Jun 06, 2006 4:58 am
Forum: Volume 100 (10000-10099)
Topic: 10067 - Playing with Wheels
Replies: 62
Views: 35802

helloneo wrote:

Code: Select all

1
0 0 9 9
2 0 9 9
2
1 0 9 9
9 0 9 9
my answer is 4 in this case. Is it right?
by shines
Sat Apr 08, 2006 6:16 am
Forum: C++
Topic: I don't know why this got CE.
Replies: 7
Views: 3496

Re: I don't know why this got CE.

#include <iostream>
bool isprime(int n){
if(n == 0 || n == 1) return true;
for(int i=2; i<n/2; i++){
if(n % i == 0)
return false;
}
return true;
}


BTW: are you sure you want isprime() to work this way? According to it 0 and 1 are prime, so is 4. I don't think you'll get AC with that.

you ...
by shines
Fri Apr 07, 2006 6:35 pm
Forum: C++
Topic: I don't know why this got CE.
Replies: 7
Views: 3496

I compiled with g++ 4.0 in linux. it's no problem.
but acm show this error message:
04482233_24.c:6: parse error before `)'
04482233_24.c:6: parse error before `&'

I used isupper() that I defined at another problem. It got AC. why this time it cause matter?
by shines
Fri Apr 07, 2006 2:03 pm
Forum: C++
Topic: I don't know why this got CE.
Replies: 7
Views: 3496

I don't know why this got CE.

This go well on my machine, but I got CE. Why?

Code: Select all

deleted..

Go to advanced search