Skip to content

Commit dc67439

Browse files
committed
Added 599A - Patrick and Shopping.cpp
1 parent 9ef63f8 commit dc67439

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

599A - Patrick and Shopping.cpp

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#include<bits/stdc++.h>
2+
using namespace std;
3+
4+
// Code Written By: Vikash Patel
5+
6+
int main()
7+
{
8+
int d1,d2,d3;
9+
cin>>d1>>d2>>d3;
10+
int a=d1+d2+d3;
11+
int b=2*d1+2*d2;
12+
int c=2*d2+2*d3;
13+
int d=2*d1+2*d3;
14+
cout<<min(a,min(b,min(c,d)))<<endl;
15+
}

0 commit comments

Comments
 (0)