#include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define __int64 long long #define long __int64 #define REP(i,a,b) for(int i=a;i 0){ result += comb2(cnti, n-1); result %= modd; cnti -= n; } comb2_data[cnt][n] = result; return result; } } int main(){ int n,s,k; int ans = 0; int mind; int test; int cnt; cin >> n >> s >> k; mind = (n - 1) * n / 2 * k; cnt = (s - mind) / k; cout << mind << endl; cout << cnt << endl; if(cnt < 0){ cout << 0 << endl; return 0; }else{ ans = 1; cout << cnt << "," << n << endl; cout << comb2(cnt, n) << endl; } return 0; }