#include <iostream>
using namespace std;

int main() {
    int r, c;
    cin >> r >> c;
    int dp[51][51] = {0};

    for (int i = 1; i <= 50; i++) {
        dp[i][1] = 1;
        dp[1][i] = 1;
    }

    for (int i = 2; i <= r; i++) {
        for (int j = 2; j <= c; j++) {
            dp[i][j] = (dp[i - 1][j] + dp[i][j - 1]) % 100000000;
        }
    }

    cout << dp[r][c];

    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: