Run ID:148810

提交时间:2026-03-01 15:10:24

#include<bits/stdc++.h> using namespace std; int main() { int n; cin>>n; for(int x=2;x<=n;x++){ for(int i=2;i<x;i++){ for(int j=i;j<x;j++){ for(int z=j;z<x;z++){ if(x*x*x==i*i*i+j*j*j+z*z*z){ cout<<"Cube = "<<x<<","<<" Triple = ("<<i<<","<<j<<","<<z<<")"<<endl; } } } } } return 0; }