Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
125875 | 陈国川 | 完美立方 | C++ | Accepted | 9 MS | 272 KB | 338 | 2025-07-15 16:07:37 |
#include<bits/stdc++.h> 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<=a;c++){ for(int d=c;d<=a;d++){ if(a*a*a==b*b*b+c*c*c+d*d*d){ printf("Cube = %d, Triple = (%d,%d,%d)\n",a,b,c,d); } } } } } return 0; }