Problem moneychanger
User peepeepoop
Submission Time 2026-02-17 18:54:16
Score 0
Max Time N/A
Max Memory N/A

Compile Error

moneychanger.cpp: In function ‘int solve(int)’:
moneychanger.cpp:8:17: error: ‘coins’ was not declared in this scope; did you mean ‘coin’?
8 | for (auto c : coins){
| ^~~~~
| coin
moneychanger.cpp: At global scope:
moneychanger.cpp:13:1: error: expected declaration before ‘}’ token
13 | }
| ^
moneychanger.cpp: In function ‘int main()’:
moneychanger.cpp:23:23: error: too many arguments to function ‘int solve(int)’
23 | cout << solve(P, coin);
| ^
moneychanger.cpp:6:5: note: declared here
6 | int solve(int x){
| ^~~~~