🧩PS/🥈Nomal
[C/C++] Codeforce 734B - Anton and Digits
Cocoon_
2020. 4. 4. 03:58
반응형
#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
Problem - B - Codeforces
codeforces.com
반응형