| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 157396 | 孔声豪 | 完美立方 | C++ | Wrong Answer | 0 MS | 268 KB | 334 | 2026-07-23 13:44:58 |
#include<iostream> using namespace std; int main(){ int n; cin>>n; for(int i=2;i<=n;i++){ for(int j=2;j<=n;j++){ for(int m=j;m<=n;m++){ for(int x=m;x<=n;x++){ if(i*i*i==j*j*j+m*m*m+x*x*x){ cout<<"Cube= "<<i<<", "<<"Truple= ("<<j<<", "<<m<<", "<<x<<')'<<endl; } } } } } return 0; }
------Input------
12
------Answer-----
Cube = 6, Triple = (3,4,5) Cube = 12, Triple = (6,8,10)
------Your output-----
Cube= 6, Truple= (3, 4, 5) Cube= 12, Truple= (6, 8, 10)