Affiliate Disclosure: This post contains Amazon affiliate links. If you purchase through these links, eBlogarithm may earn a commission at no extra cost to you. Prices and availability are subject to change.
Hey guys I just tried the anton and digits problem , hope you might like my solution feel free to comment better solution .
#include<bits/stdc++.h>
using namespace std;
int main()
{
long long int two, thr, fv, sx,ans, Min;
ans=0;
cin>>two>>thr>>fv>>sx;
Min = two;
if(Min>fv)
Min=fv;
if(Min>sx)
Min=sx;
ans = Min*256;
two = two – Min;
Min = two;
if(Min>thr)
Min=thr;
ans = ans+Min*32;
cout<<ans<<endl;
return 0;
}
📦 Looking for Codeforces Round 379 Div Problem Anton? Check the best deals on Amazon.
🛒 Shop Codeforces Round 379 Div Problem Anton on Amazon
As an Amazon Associate, eBlogarithm earns from qualifying purchases. Prices and availability are subject to change.
Affiliate Disclosure: This post contains Amazon affiliate links. If you purchase through these links, eBlogarithm may earn a commission at no extra cost to you. Prices and availability are subject to change.
Hey guys I just tried the anton and digits problem , hope you might like my solution feel free to comment better solution .
#include<bits/stdc++.h>
using namespace std;
int main()
{
long long int two, thr, fv, sx,ans, Min;
ans=0;
cin>>two>>thr>>fv>>sx;
Min = two;
if(Min>fv)
Min=fv;
if(Min>sx)
Min=sx;
ans = Min*256;
two = two – Min;
Min = two;
if(Min>thr)
Min=thr;
ans = ans+Min*32;
cout<<ans<<endl;
return 0;
}
📦 Looking for Codeforces Round 379 Div Problem Anton? Check the best deals on Amazon.
🛒 Shop Codeforces Round 379 Div Problem Anton on Amazon
As an Amazon Associate, eBlogarithm earns from qualifying purchases. Prices and availability are subject to change.