Search found 4 matches

by code_man
Wed May 16, 2007 6:13 pm
Forum: Volume 102 (10200-10299)
Topic: 10229 - Modular Fibonacci
Replies: 53
Views: 17180

10229 runtime error

I have runtime error, but I don't know why? Somebody can tell me what's wrong with this code? : #include<iostream> using namespace std; int fibon(int a); int potega(int b); int main() { int n, m; while(cin>>n>>m) { cout<<fibon(n)%potega(m)<<"\n"; } } /************************************************...
by code_man
Fri Feb 23, 2007 9:58 pm
Forum: Volume 101 (10100-10199)
Topic: 10189 - Minesweeper
Replies: 418
Views: 67886

thx big_mac for you help..:) Now I know whats was incorrect..
by code_man
Wed Feb 14, 2007 7:51 pm
Forum: Volume 101 (10100-10199)
Topic: 10189 - Minesweeper
Replies: 418
Views: 67886

10189

what is wrong with this code? I have WA.. I don't undersand why...? #include<iostream> using namespace std; char check(char t) { int i=0; if(t!=42) i=1; return i; } main() { int a, b, it=1; while(cin>>a>>b) { if((a==0) && (b==0)) break; char **t; t= new char*[a+5]; for(int i=0; i<a+5; i++) t[i] = ne...
by code_man
Thu Feb 01, 2007 11:08 am
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 184484

100

I don't understand this check system.. Yesterday I submit this code and answer was WA but tuday I send this same code and was AC?? is it strange?? #include <iostream> using namespace std; int main(void){ long i,j,m,temp,total,max; while(cin>>i>>j){ cout<<i<<" "<<j<<" "; max=0; if(i>j){ temp=i; i=j; ...

Go to advanced search