Run ID:66167
提交时间:2024-03-02 17:20:29
#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c,d,e; cin>>a; for(b=2;b<=a;b++) for(c=2;c<=b;c++) for(d=2;d<=c;d++) for(e=2;e<=d;e++){ if(c*c*c+d*d*d+e*e*e==b*b*b){ cout<<"Cube = "<<b<<", Triple = ("<<e<<','<<d<<','<<c<<")"<<endl; } } return 0; }