백준(Python) 풀이/수학
백준(Python) 15439번 Vera and Outfits 풀이
개발윗미
2021. 11. 5. 13:35
Python으로 구현한 15439번 Vera and Outfits 문제 풀이입니다.
https://www.acmicpc.net/problem/15439
15439번: Vera and Outfits
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.
www.acmicpc.net
n = int(input())
print(n * (n - 1))
의상은 상의 1개와 바지 1개로 구성되어 있기 때문에 단순히 입력받은 n과 n - 1 값을 곱하여 출력한다.