반응형
#include<stdio.h>
#include<algorithm>
using namespace std;
int k2, k3, k5, k6;
int sum = 0;
int main()
{
scanf("%d %d %d %d", &k2, &k3, &k5, &k6);
int arr[3] = { k2,k5,k6 };
sort(arr, arr + 3);
sum += 256 * arr[0];
k2 -= arr[0];
if(k2 > 0)
{
if (k2 >= k3)
{
sum += 32 * k3;
}
else
{
sum += 32 * k2;
}
}
printf("%d", sum);
}
https://codeforces.com/contest/734/problem/B
반응형
'🧩PS > 🥈Nomal' 카테고리의 다른 글
[C/C++] Codeforce 1003C - Intense Heat (0) | 2020.04.04 |
---|---|
[C/C++] Codeforce 466C - Number of Ways (0) | 2020.04.04 |
[C/C++] Codeforce 1285B - Just Eat It! (0) | 2020.04.04 |
[C/C++] Codeforce 118A - String Task (tolower, toupper 함수) (0) | 2020.03.22 |
[C/C++] Codeforce 71A - Way Too Long Words (0) | 2020.03.22 |