Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
7164 柯宇希 完美立方 C++ Output Limit Exceeded 0 MS 260 KB 627 2025-04-05 14:28:55

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(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^3==b^3+c^3+d^3){ cout<<"Cube = "<<a<<", Triple = ("<<b<<","<<c<<","<<d<<") "<<endl; } } } } } return 0; }