[백준] #15439 Vera and Outfits(c++)

kkily·2021년 7월 20일
0

[알고리즘]

목록 보기
48/102

문제링크

상의와 하의에 n개의 색이 있고 서로 다른 색을 입어야하기 때문에
n*n-1을 출력하면 된다.

#include<iostream>

using namespace std;

int main(){
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);

    int n;
    cin >> n;
    cout << n * (n - 1);
}
profile
낄리의 개발 블로그╰(*°▽°*)╯

0개의 댓글