Run ID:134260
提交时间:2025-10-26 11:26:01
#include <bits/stdc++.h> using namespace std; int main() { int n, a, b, c, d; cin >> n; for(int i = 1;i <= n; i++) { for(int b = 2;b <= n;b++) { for(int c = b;c <= n;c++) { for(int d = c;d <= n;d++) { if(i * i * i == b * b* b + c* c* c + d * d* d) { cout << "Cube = "<< i<<", Triple = ("<<b<<","<<c<<","<<d<<")"; cout << endl; } } } } } return 0; }