Salvens

M

Aug 15th, 2023
911
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.65 KB | None | 0 0
  1. #include <algorithm>
  2. #include <iostream>
  3. #include <array>
  4. #include <vector>
  5. #include <numeric>
  6. #include <random>
  7. #include <chrono>
  8. #include <set>
  9. #include <map>
  10. #include <queue>
  11.  
  12. using namespace std;
  13.  
  14. #define int long long
  15.  
  16. const int INF = 1e18 + 7;
  17. const int MAXN = 1e4 + 1000;
  18. const int N = 1e5 + 10;
  19.  
  20. int n;
  21.  
  22. signed main() {
  23.     ios_base::sync_with_stdio(false);
  24.     cin.tie(nullptr);
  25.  
  26.     cin >> n;
  27.     while (n) {
  28.         if (n <= 9) {
  29.             cout << "Stan wins.\n";
  30.             return 0;
  31.         } else if (n <= 18) {
  32.             cout << "Ollie wins.\n";
  33.             return 0;
  34.         }
  35.         n = (n + 17) / 18;
  36.     }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment