Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
129772 陈奕涵 完美立方 C++ Output Limit Exceeded 1742 MS 268 KB 418 2025-09-06 13:52:17

Tests(0/10):


Code:

#include<iostream> // cin\cout\endl #include<cstdio> #include<cstring> #include<cmath> using namespace std; int main(){ int n,a,b,c,d; cin>>n; for(a=2;a<=n;a++){ for(b=2;c<=a;b++){ for(c=b;b<=a;c++){ for(d=c;d<=a;d++){ if(a*a*a==b*b*b+c*c*c+d*d*d){ cout<<"Cube="<<a<<"Triple=("<<b<<","<<c<<","<<d<<")"<<endl; } } } } } return 0; }