Problem foodchain
User akshtsinghania
Submission Time 2024-03-14 18:46:33
Score 0
Max Time N/A
Max Memory N/A

Compile Error

foodchain.cpp: In function ‘int main()’:
foodchain.cpp:14:11: error: invalid operands of types ‘double’ and ‘double’ to binary ‘operator%’
14 | n %= MOD;
| ~~^~~~~~
foodchain.cpp:14:14: error: in evaluation of ‘operator%=(double, double)’
14 | n %= MOD;
| ^~~
foodchain.cpp:15:25: error: invalid operands of types ‘double’ and ‘double’ to binary ‘operator%’
15 | ans = (ans * n) % MOD;
| ~~~~~~~~~ ^ ~~~
| | |
| double double
foodchain.cpp:17:17: error: invalid operands of types ‘double’ and ‘double’ to binary ‘operator%’
17 | cout << ans % MOD << endl;
| ~~~ ^ ~~~
| | |
| | double
| double