Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <algorithm>
- #include <cmath>
- using namespace std;
- int main()
- {
- long double a, b, c;
- cin >> a >> b >> c;
- long double ans = a + ((b - c) / 3.0);
- if(ceil(ans) < 0)
- {
- cout << 0;
- }
- else
- {
- cout << ((long long)ceil(ans));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement