ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1053. Pinocchio

whi i got CE
Posted by I am david. Tabo. 16 May 2002 10:51
#include

int gcd( int a, int b ){
  return b ? gcd( b, a%b ) : a;
}

int main () {
  int n, L, g=0;
  cin >> n;
  while( cin >> L ) g=gcd( L, g );
  cout << g << endl;
}
Re: whi i got CE
Posted by ECUST Multistar 23 May 2002 16:40
include what?
gcd is wrong too!
Re: whi i got CE
Posted by RoskaTa [C++ rLz] 14 Feb 2009 15:22
#include <iostream>
using namespace std;

int gcd( int a, int b )
{
return b ? gcd( b, a%b ) : a;
}

int main ()
{
int n, L, g=0;

cin >> n;

while( cin >> L ) g=gcd( L, g );
cout << g << endl;
}

Change your code to this and it runs perfectly!
Re: whi i got CE
Posted by strider 15 Feb 2009 18:07
Not complited first line, i suppose:

#include (what??)