hdu 1014(数学)

//数学题

#include <cstdio>
#include <iostream>

using namespace std;

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

int main() {
int n, m;
while (scanf("%d%d", &n, &m) != EOF) {
printf ("%10d%10d", n, m);
if (gcd(n, m) == 1) printf (" Good Choice\n\n");
else printf (" Bad Choice\n\n");
}
return 0;
}

 

你可能感兴趣的:(HDU)