Main.cc: In function 'int main()':
Main.cc:2:237: error: expected '}' at end of input
2 | int k; int main() { scanf("%d", &k); for (int x = -50; x <= 50; ++x) { for (int y = x; y <= 50; ++y) { for (int z = y; z <= 50; ++z) { if (x && y && z && x * x * x + y * y * y + z * z * z == k) { printf("%d %d %d
", x, y, z); return 0; //直接退出程序即可,可以不多次break跳出全部循环 } } } }printf("no solution"); return 0; }
| ~ ^
Main.cc:2:237: error: expected '}' at end of input
2 | int k; int main() { scanf("%d", &k); for (int x = -50; x <= 50; ++x) { for (int y = x; y <= 50; ++y) { for (int z = y; z <= 50; ++z) { if (x && y && z && x * x * x + y * y * y + z * z * z == k) { printf("%d %d %d
", x, y, z); return 0; //直接退出程序即可,可以不多次break跳出全部循环 } } } }printf("no solution"); return 0; }
| ~ ^
Main.cc:2:237: error: expected '}' at end of input
2 | int k; int main() { scanf("%d", &k); for (int x = -50; x <= 50; ++x) { for (int y = x; y <= 50; ++y) { for (int z = y; z <= 50; ++z) { if (x && y && z && x * x * x + y * y * y + z * z * z == k) { printf("%d %d %d
", x, y, z); return 0; //直接退出程序即可,可以不多次break跳出全部循环 } } } }printf("no solution"); return 0; }
| ~ ^
Main.cc:2:237: error: expected '}' at end of input
2 | int k; int main() { scanf("%d", &k); for (int x = -50; x <= 50; ++x) { for (int y = x; y <= 50; ++y) { for (int z = y; z <= 50; ++z) { if (x && y && z && x * x * x + y * y * y + z * z * z == k) { printf("%d %d %d
", x, y, z); return 0; //直接退出程序即可,可以不多次break跳出全部循环 } } } }printf("no solution"); return 0; }
| ~ ^
Main.cc:2:237: error: expected '}' at end of input
2 | int k; int main() { scanf("%d", &k); for (int x = -50; x <= 50; ++x) { for (int y = x; y <= 50; ++y) { for (int z = y; z <= 50; ++z) { if (x && y && z && x * x * x + y * y * y + z * z * z == k) { printf("%d %d %d
", x, y, z); return 0; //直接退出程序即可,可以不多次break跳出全部循环 } } } }printf("no solution"); return 0; }
| ~ ^