Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
64627 殷震博 完美立方 C++ Accepted 77 MS 272 KB 362 2024-01-21 17:19:24

Tests(10/10):


Code:

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