Search found 2 matches

by pelinwang
Sun Feb 04, 2007 6:51 am
Forum: Volume 4 (400-499)
Topic: 406 - Prime Cuts
Replies: 187
Views: 25957

after I change the ninth line in my code

Code: Select all

while ((cin >> n >> c) && n >=1 && n <= 1000 && c >= 1 && c <= n)
c <= n into c <= 1000
I have got AC.
by pelinwang
Thu Feb 01, 2007 2:43 pm
Forum: Volume 4 (400-499)
Topic: 406 - Prime Cuts
Replies: 187
Views: 25957

406 WA why?>"<

Here is my code #include <iostream> #include <cmath> using namespace std; int primejudge (int n); int main(){ int n , c; while ((cin >> n >> c) && n >=1 && n <= 1000 && c >= 1 && c <= n){ int prime[n] , primeaddress; if (n == 1){ prime[0] = 1; primeaddress = 1; } else if (n == 2){ prime[0] = 1; prim...

Go to advanced search