Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
136088 唐诗阳 完美立方 C++ Wrong Answer 1 MS 268 KB 654 2025-11-09 14:54:05

Tests(0/10):


Code:

#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 a,b,c,d,N; cin>>N; for(int a=2;a<=N;a++){ for(int d=2;d<=a;d++){ for(int c=2;c<=b;c++){ for(int b=2;b<=c;b++){ if(a*a*a==b*b*b+c*c*c+d*d*d){ cout<<"Cube = "<<a<<", Triple = ("<<b<<','<<c<<','<<d<<')'<<endl; } } } } } return 0; }


Run Info:

------Input------
12
------Answer-----
Cube = 6, Triple = (3,4,5) Cube = 12, Triple = (6,8,10)
------Your output-----