728x90

 0. [c++] 백준  - 


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


 1. 풀이




 2. 소스코드


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include<iostream>
 
using namespace std;
 
const int INF = 1000000007;
 
int main() {
    int temp, cheap = INF, ret = 0;
 
    for (int i = 0; i < 3; i++) {
        cin >> temp;
        if (cheap > temp)
            cheap = temp;
    }
 
    ret = cheap;
    cheap = INF;
    for (int i = 0; i < 2; i++) {
        cin >> temp;
        if (cheap > temp)
            cheap = temp;
    }
 
    cout << ret + cheap - 50 << endl;
 
    return 0;
}
cs


 3. 참고




질문이나 지적 있으시면 댓글로 남겨주세요~

도움 되셨으면 하트 꾹!


+ Recent posts