Run ID:136095

提交时间:2025-11-09 15:04:59

#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(int a=2;a<=N;a++){ for(int b=2;b<=a;b++){ for(int c=b;c<=b;c++){ for(int d=c;d<=c;d++){ if(a*a*a==b*b*b+c*c*c+d*d*d){ cout<<"Cube = "<<a<<", Triple = ("<<b<<','<<c<<','<<d<<')'<<endl; } } } } } return 0; }