PandA-2024.02
gcd.cc
Go to the documentation of this file.
1 #include <algorithm>
2 int gcd(int x, int y )
3  {
4  if( x < y )
5  std::swap( x, y );
6 
7  while( y > 0 )
8  {
9  int f = x % y;
10  x = y;
11  y = f;
12  }
13  return x;
14  }
15 
16 
int gcd(int x, int y)
Definition: gcd.cc:2
x
Return the smallest n such that 2^n >= _x.

Generated on Mon Feb 12 2024 13:02:49 for PandA-2024.02 by doxygen 1.8.13