Advertisement
Guest User

Untitled

a guest
Dec 8th, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. #include <iostream>
  2. #include <algorithm>
  3. #include <cmath>
  4.  
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9. long double a, b, c;
  10. cin >> a >> b >> c;
  11. long double ans = a + ((b - c) / 3.0);
  12. if(ceil(ans) < 0)
  13. {
  14. cout << 0;
  15. }
  16. else
  17. {
  18. cout << ((long long)ceil(ans));
  19. }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement