eolymp
bolt
Try our new interface for solving problems
Problems

Степан і похід в магази

published at 1/2/24, 8:48:33 pm

include <iostream>

include <cmath>

using namespace std; int main () { int n,m,c; cin>>n>>m>>c; if(n+m+m+n<n+m+c) cout<<n+n+m+m; else if(n+c+c+n<n+m+c) cout<<n+c+c+n; else if(m+m+c+c<n+m+c) cout<<m+m+c+c; else cout<<n+m+c; }