Codeforces Round #332 (Div. 2)
codeforces 599 A solution in cpp
by ujjal roy
#include<bits/stdc++.h>
using namespace std;
main()
{
int d1,d2,d3;
cin>>d1>>d2>>d3;
long long int mine=d1+d2+d3;
if((2*d1+2*d2)<mine) mine=2*d1+2*d2;
if((2*d1+2*d3)<mine) mine=2*d1+2*d3;
if((2*d3+2*d2)<mine) mine=2*d3+2*d2;
cout<<mine<<endl;
return 0;
}
0 Comments