fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int a, b, x;
  6. cin >> a >> b >> x;
  7. if (x % 2 == 0 && x >= a && x <= b) {
  8. cout << "PAR";
  9. } else if (x % 2 != 0 && x > b) {
  10. cout << "IMPAR";
  11. } else {
  12. cout << "GRESEALA";
  13. }
  14. return 0;
  15. }
Success #stdin #stdout 0.01s 5356KB
stdin
2 12 7
stdout
GRESEALA