fork download
  1. #include <bits/stdc++.h>
  2. #define ull unsigned long long
  3. #define ll long long
  4. #define el endl
  5. #define nl '\n'
  6. #define all(v) v.begin(), v.end()
  7. using namespace std;
  8.  
  9. void input()
  10. {
  11. if (fopen("in.txt", "r"))
  12. {
  13. freopen("in.txt", "r", stdin);
  14. freopen("out.txt", "w", stdout);
  15. }
  16. }
  17.  
  18. void init()
  19. {
  20. ios_base::sync_with_stdio(false);
  21. cin.tie(nullptr);
  22. }
  23. int main()
  24. {
  25. Fast:
  26. input();
  27. init();
  28. //---------------------------------------------------------------------------------------------------------------
  29. int n;
  30. cin >> n;
  31. if (n * -1 == -n)
  32. {
  33. cout << n << nl;
  34. }
  35. else
  36. cout << "enter another one (pos) ." << nl;
  37.  
  38. return 0;
  39. }
Success #stdin #stdout 0.01s 5308KB
stdin
Standard input is empty
stdout
32766