fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. const int TEN = 10;
  5.  
  6. int main() {
  7. int n, firstDigit, secondDigit, thirdDigit;
  8. cin >> n;
  9. thirdDigit = n % TEN;
  10. secondDigit = n / TEN % TEN;
  11. firstDigit = n / TEN / TEN;
  12. if (firstDigit == secondDigit - 1 && firstDigit == thirdDigit - 2) {
  13. cout << "SUNT";
  14. } else {
  15. cout << "NU SUNT";
  16. }
  17. return 0;
  18. }
Success #stdin #stdout 0s 5288KB
stdin
320
stdout
NU SUNT