Run ID:66164

提交时间:2024-03-02 17:12:20

#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c,d,e; cin>>a; for(b=1;b<=a;b++) for(c=1;c<b;c++) for(d=1;d<c;d++) for(e=1;e<d;e++){ if(c*c*c+d*d*d+e*e*e==b*b*b){ cout<<"Cube = "<<b<<", Triple = ("<<c<<','<<d<<','<<e<<")"<<endl; } } return 0; }