Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- using namespace std;
- int main(){
- long long blue, yel;
- cin>>yel>>blue;
- long long x,y,z;
- cin>>x>>y>>z;
- yel-=x*2;
- yel-=y;
- blue-=y;
- blue-=z*3;
- unsigned long long ans=0;
- if(blue<0){
- ans+=abs(blue);
- }
- if(yel<0){
- ans+=abs(yel);
- }
- cout<<ans;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement