Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- #define ll long long;
- const int scz = 1e9;
- int main()
- {
- ///freopen ("sapsan.in", "r", stdin);
- ///freopen ("sapsan.out", "w", stdout);
- int n;
- cin >> n;
- for (int i = n; i >= 0; i -= 2)
- {
- if ((i / 2) % 2 == 0 && (i / 2) + ((i / 2) / 2) <= n / 2)
- {
- cout << i;
- return 0;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement