Baekjoon #1010

Baekjoon #1010

3개의 풀이 · C++, Java, Python

문제 원문 보기 ↗

SOLUTION INFO

C++ · main.cpp

main.cpp
#include<bits/stdc++.h>

using namespace std;
typedef long long ll;

ll DP[33][33];

int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    
    int T; cin >> T;
    DP[0][0] = 1;
    for(int i=1;i<=30;i++) {
        DP[i][0] = 1;
        for(int j=1;j<=30;j++) {
            DP[i][j] = DP[i - 1][j] + DP[i - 1][j - 1];
        }
    }
    while(T--) {
        int N, M; cin >> N >> M;
        cout << DP[M][N] << '\n';
    }

    return 0;
}

SOLUTION DESCRIPTION

풀이 설명

등록된 풀이 설명이 없습니다.