fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. const int TEN = 10;
  5. const int HUNDRED =100;
  6.  
  7. int main() {
  8. int a, b;
  9. cin >> a >> b;
  10. int zeciA = 0, zeciB = 0, suteA = 0, suteB = 0, miiA = 0, miiB = 0;
  11. if (a < HUNDRED) {
  12. zeciA = a;
  13. } else if (a >= HUNDRED && a < (TEN * HUNDRED)) {
  14. zeciA = a % HUNDRED;
  15. } else {
  16. zeciA = a % HUNDRED;
  17. }
  18. ///
  19. if (b < HUNDRED) {
  20. zeciB = b;
  21. } else if (b >= HUNDRED && b < (TEN * HUNDRED)) {
  22. zeciB = b / TEN;
  23. } else {
  24. zeciB = b / HUNDRED;
  25. }
  26.  
  27. if (zeciA == zeciB && a >= (TEN * HUNDRED) && b >= (TEN * HUNDRED)) {
  28. cout << "CONTINUA";
  29. } else if (zeciA == zeciB && a <HUNDRED && b >= (TEN * HUNDRED)) {
  30. cout << "CONTINUA";
  31. }else if (zeciA == zeciB && b < (TEN * HUNDRED)) {
  32. cout << "FAZAN";
  33. }else if (zeciA != zeciB) {
  34. cout << "GRESEALA";
  35. }
  36.  
  37.  
  38. cout << "\n" << zeciA << " " << zeciB ;
  39. return 0;
  40. }
Success #stdin #stdout 0.01s 5272KB
stdin
4
1234 3456 5611 1122
stdout
GRESEALA
4 12