Advertisement
Guest User

Untitled

a guest
Aug 21st, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. #include <iostream>
  2. #include<stdio.h>
  3. using namespace std;
  4.  
  5.  
  6. int main(){
  7. int p,x, cost=0;
  8. scanf("%d%d",&x,&p);
  9. while(x!=0){
  10. cost+=x;
  11. x=(100-p)*x/100;
  12. }
  13. printf("%d\n",cost);
  14. return 0;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement