A,B,C,D를 정렬 한 후 1,3번째 수를 곱해주면 된다.
<코드>
1 2 3 4 5 6 7 8 9 10 11 12 | #include <algorithm> #include <stdio.h> using namespace std; int a[4]; int main() { for (int i = 0; i < 4; i++) scanf("%d", &a[i]); sort(a, a + 4); printf("%d\n", a[0] * a[2]); return 0; } | cs |