Run ID:162843

提交时间:2026-10-21 19:21:55

#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int a,b,c,d,n; cin>>n; for(a=2;a<=n;a++){ for(b=2;b<n;b++){ for(c=b;c<n;c++){ for(d=c;d<n;d++){ if(a*a*a==b*b*b+c*c*c+d*d*d){ cout<<"Cube = "<<a<<", "<<"Triple = ("<<b<<','<<c<<','<<d<<')'<<endl; } } } } } return 0; }