Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
8212 | 刘芃伽 | 完美立方 | C++ | Accepted | 12 MS | 260 KB | 529 | 2025-06-15 10:34:35 |
#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=b;c<=n;c++){ for(int d=c;d<=n;d++){ if(a*a*a==b*b*b+c*c*c+d*d*d){ //Cube = 12, Triple = (6,8,10) cout<<"Cube"<<" = "<<a<<", Triple = "<< '('<<b<<','<<c<<","<<d<<')'<<endl; } } } } } return 0; }