Problem | binarycoins |
---|---|
User | bluesky2113 |
Submission Time | 2024-08-26 16:21:29 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
cc1plus: error: ‘::main’ must return ‘int’
binarycoins.cpp: In function ‘int main()’:
binarycoins.cpp:5:86: error: ‘a’ was not declared in this scope
5 | int main() {int N; cin >> N; for (int i = 0; i < sqrt(N); i++) {if (pow(2, i) >= N) {a = i; break;}}; b = a; for (int j = a; j >= 0; j--) {count += b / static_cast<int>(pow(2, a); b = b % static_cast<int>(pow(2, j));}return 0;}
| ^
binarycoins.cpp:5:103: error: ‘b’ was not declared in this scope
5 | int main() {int N; cin >> N; for (int i = 0; i < sqrt(N); i++) {if (pow(2, i) >= N) {a = i; break;}}; b = a; for (int j = a; j >= 0; j--) {count += b / static_cast<int>(pow(2, a); b = b % static_cast<int>(pow(2, j));}return 0;}
| ^
binarycoins.cpp:5:107: error