Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <string>
- #include <iostream>
- #include <list>
- #include <algorithm>
- using namespace std;
- int main(){
- int n,i,j,k,rb,kp,s=0;
- cin>>rb>>kp;
- while(rb>=5){rb-=5;s++;}
- while(rb>=2){rb-=2;s++;}
- while(rb>=1){rb-=1;s++;}
- while(kp>=50){kp-=50;s++;}
- while(kp>=10){kp-=10;s++;}
- while(kp>=5){kp-=5;s++;}
- while(kp>=1){kp-=1;s++;}
- cout<<s;
- return 0;}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement