본문 바로가기

Programming/BaekJoon

[C++] 백준 5543번 : 상근날드


https://www.acmicpc.net/problem/5543




#include <iostream>

using namespace std;

int main() {

int Bugger[3];

int a, b;


cin >> Bugger[0] >> Bugger[1] >> Bugger[2] >> a >> b;


int c=Bugger[0];

for (int i = 1; i < 3; i++) 

if (c > Bugger[i])

c = Bugger[i];

int c1 = a > b ? b : a;

cout << c1 + c-50;

}