| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 135699 | 陈骏睿 | 完美立方 | C++ | Wrong Answer | 1 MS | 272 KB | 593 | 2025-11-08 11:34:53 |
#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int N,a,b,c,d,Cube=0,Tripie=0; cin>>N; for(a=2;a<=N;a++){ for(b=2;b<a;b++){ for(c=b;c<a;c++){ for(d=c;d<a;d++){ if(a*a*a==(b*b*b+c*c*c+d*d*d)) cout<<"Cube = "<<a<<", "<<"Tripie = ("<<b<<','<<c<<','<<d<<')'<<endl; } } } } return 0; }
------Input------
12
------Answer-----
Cube = 6, Triple = (3,4,5) Cube = 12, Triple = (6,8,10)
------Your output-----
Cube = 6, Tripie = (3,4,5) Cube = 12, Tripie = (6,8,10)