알고리즘

[알고리즘] 백준 27110 - 특식 배부 (C++)

blueberrysoda 2024. 12. 9. 21:24

[문제 링크] : https://www.acmicpc.net/problem/27110

#include <iostream>
using namespace std;

int N, A, B, C;

int main(){
    cin >> N >> A >> B >> C;
    cout << min(A, N) + min(B, N) + min(C, N) << "\n";
    return 0;
}