#include <iostream>
using namespace std;
const int SIZE = 17;
int main()
{
long long factorials[SIZE];
factorials[0] = 1;
factorials[1] = 1;
for(int i = 2; i<SIZE; i++)
{
factorials[i] = factorials[i-1] * i;
}
for(int i=0; i<SIZE; i++)
{
cout<<factorials[i]<<endl;
}
return 0;
}
이것도 동적계획법인가요?
ㄴ 감사합니당
조그만한 부분문제로 큰 문제를 푸는게 동적계획법이라고 생각하면 쉬워요 - dc App