Advertisement
Guest User

Untitled

a guest
Oct 17th, 2019
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. long double x;
  8. int cnt=0,t,y,c;
  9. cin>>x>>t>>y>>c;
  10. while(x>y)
  11. {
  12. cnt++;
  13. x=x-x/c;
  14. }
  15. cout<<1ll*cnt*t;
  16. return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement