Advertisement
Guest User

Untitled

a guest
Mar 25th, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. #include <iostream>
  2. #include <iomanip>
  3. #include <cstring>
  4. #include <vector>
  5. #include <algorithm>
  6. #include <math.h>
  7. #include <iomanip>
  8. #include <ctime>
  9.  
  10. using namespace std;
  11.  
  12. int main()
  13. {
  14. int r, h, w;
  15. int ans = 0;
  16. cin >> r >> h >> w;
  17. while (2*r < sqrt(h*h + w*w))
  18. {
  19. ans++;
  20. if (h > w)
  21. {
  22. h = h/2;
  23. }
  24. else
  25. {
  26. w = w/2;
  27. }
  28. }
  29. cout << ans << endl;
  30.  
  31. return 0;
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement