Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
136090 顾文博 完美立方 C++ Compile Error 0 MS 0 KB 679 2025-11-09 14:56:12

Tests(0/0):


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 b=2;b<=a;b++){ for(int c=b;c<=b;c++){ for(int d=c;d<=c;d++){ 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:

Main.cc: In function 'int main()':
Main.cc:8:9: warning: unused variable 'a' [-Wunused-variable]
     int a,b,c,d,n;
         ^
Main.cc:8:11: warning: unused variable 'b' [-Wunused-variable]
     int a,b,c,d,n;
           ^
Main.cc:8:13: warning: unused variable 'c' [-Wunused-variable]
     int a,b,c,d,n;
             ^
Main.cc:8:15: warning: unused variable 'd' [-Wunused-variable]
     int a,b,c,d,n;
               ^
Main.cc:21:13: error: expected '}' at end of input
     return 0;
             ^