3051 {
3052 int m;
3053 int x;
3054 int y;
3055 cin >> m >> x >> y;
3058 int a_f;
3059 int b_f;
3060 double c_f;
3061 bool no_solution = true;
3062 for(
int a = 10;
a <= 99;
a++) {
3063 ostringstream oss;
3065 string str_a = oss.str();
3066 stringstream ss;
3067 for(auto it = str_a.rbegin(); it != str_a.rend(); ++it) {
3068 ss << *it;
3069 }
3071 const double c =
static_cast<double>(
b) / y;
3072 if(c * x == abs(
a -
b)) {
3073 no_solution = false;
3076 c_f = c;
3077 }
3078 }
3079 if(no_solution) {
3080 cout << "No Solution";
3081 return 0;
3082 }
3083 cout << a_f << ' ';
3084 if(a_f < m) {
3085 cout << "Gai ";
3086 } else if(a_f == m) {
3087 cout << "Ping ";
3088 } else {
3089 cout << "Cong ";
3090 }
3091 if(b_f < m) {
3092 cout << "Gai ";
3093 } else if(b_f == m) {
3094 cout << "Ping ";
3095 } else {
3096 cout << "Cong ";
3097 }
3098 if(c_f < m) {
3099 cout << "Gai";
3100 } else if(c_f == m) {
3101 cout << "Ping";
3102 } else {
3103 cout << "Cong";
3104 }
3105 return 0;
3106 }