Solution
1633-Dice_Combinations.cpp
1#include<bits/stdc++.h>
2using namespace std;
3#define int long long
4const int m=1e9+7;
5signed main(){
6 ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
7 int n; cin>>n;
8 int dp[n+1]; dp[0]=1;
9 for(int i=1;i<=n;++i){
10 dp[i]=0;
11 for(int j=1;j<7&&i>=j;++j)
12 dp[i]+=dp[i-j],dp[i]%=m;
13 }
14 cout<<dp[n]<<'\n';
15 return 0;
16}Editorial not yet generated for this problem. Run the editorial generation script to add hints and detailed explanations.