📕 문제
📌 링크
![문제 사진](https://velog.velcdn.com/images/wowns226/post/a75d1353-6c54-439c-9ed7-4047480517cb/image.png)
📘 코드
namespace BOJ
{
class No_11057
{
const int MOD = 10_007;
static void Main()
{
using StreamReader input = new StreamReader(new BufferedStream(Console.OpenStandardInput()));
using StreamWriter output = new StreamWriter(new BufferedStream(Console.OpenStandardOutput()));
int n = int.Parse(input.ReadLine());
int[,] dp = new int[n + 1, 10];
for(int i = 0 ; i < 10 ; i++)
dp[1, i] = 1;
for(int i = 1 ; i <= n ; i++)
for(int j = 0 ; j < 10 ; j++)
for(int k=0 ;k<=j ;k++)
dp[i, j] = (dp[i, j] + dp[i - 1, k]) % MOD;
long answer = 0;
for(int i = 0 ; i < 10 ; i++)
answer += dp[n, i];
output.WriteLine(answer % MOD);
}
}
}
📙 오답노트
📒 알고리즘 분류