Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //
- // main.cpp
- // STRATEGY
- //
- // Created by Андрей Москалёв on 17.01.17.
- // Copyright © 2017 Андрей Москалёв. All rights reserved.
- //
- #include <iostream>
- #include <cmath>
- using namespace std;
- int main(int argc, const char * argv[]) {
- int a, b, c, ans;
- cin >> a >> b >> c;
- if (a < 0) ++a;
- ans = a - b + c;
- if (ans <= 0) --ans;
- cout << ans;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement