Problem binomial
User chickengoat
Submission Time 2025-10-25 16:25:24
Score 0
Max Time N/A
Max Memory N/A

Compile Error

binomial.cpp: In function ‘long long int exponent(long long int, long long int)’:
binomial.cpp:8:48: error: ‘M’ was not declared in this scope
8 | if (b % 2) return a * exponent(a, b - 1) % M;
| ^
binomial.cpp:10:30: error: ‘M’ was not declared in this scope
10 | return newexp * newexp % M;
| ^
binomial.cpp: In function ‘int main()’:
binomial.cpp:20:16: error: ‘M’ was not declared in this scope
20 | ans %= M;
| ^
binomial.cpp:24:9: error: ‘product’ was not declared in this scope
24 | product *= exponent(z, M - 2);
| ^~~~~~~
binomial.cpp:24:32: error: ‘M’ was not declared in this scope
24 | product *= exponent(z, M - 2);
| ^
binomial.cpp:28:13: error: ‘product’ was not declared in this scope
28 | cout << product;