哪位大佬能看看我哪错了!!!

ykj104 2024-05-07 18:33:11 9

#include <bits/stdc++.h> using namespace std;

int main() { int a, b, c, n; cin >> n; for (int i = 100; i <= n; i++) { a = i % 10; b = i / 10 % 10; c = i / 10 / 10 % 10; if ((a * a * a) + (b * b * b) + (c * c * c) == i) { cout << i; } } }

{{ vote && vote.total.up }}

共 1 条回复

root 站长

输出格式错误,每行一个整数