Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include<stdio.h>
- using namespace std;
- int main(){
- int p,x, cost=0;
- scanf("%d%d",&x,&p);
- while(x!=0){
- cost+=x;
- x=(100-p)*x/100;
- }
- printf("%d\n",cost);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement