로딩
요청 처리 중입니다...

15439 - Vera and Outfits(C++)

 15439 - Vera and Outfits(C++)

https://www.acmicpc.net/problem/15439문제 : Vera owns N tops and N pants. The i-th top and i-th pants have colour i, for 1 ≤ i ≤ N, where all N colours are different from each other.An outfit consists of one top and one pants.

Vera likes outfits where the top and pants are not the same colour.How many different outfits does she like?(번역 : 옷과 바지의 색깔의 수를 입력값으로 받는다.

같은 색의 옷과 바지는 입을 수 없다고 할 때 옷과 바지의 조합의 수를 구하시오.) 옷 하나를 먼저 고르고(a), 그 옷과 같은 색을 제외한 바지를 고르면 된다.

(a-1)a와 a-1를 곱하고 그 수를 출력하면 된다....