Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
96706 | 王思颜 | 完美立方 | C++ | Compile Error | 0 MS | 0 KB | 398 | 2024-11-09 12:01:40 |
#include<bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; for (int a = 1;a <= n;a++){ for (int b = 1;b <= a;a++){ for (int c = 1;c <= a;a++){ for (int d = 1;d <= a;a++){ if (a * a * a = b * b * b + c * c *c + d * d * d && b <= c <= d){ cout<<"Cube = "<<a<<,"Triple = "<<"("<<b<<","<<c<<","<<d<<")"; } } } } } return 0; }
Main.cc: In function 'int main()': Main.cc:11:60: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if (a * a * a = b * b * b + c * c *c + d * d * d && b <= c <= d){ ^ Main.cc:11:20: error: lvalue required as left operand of assignment if (a * a * a = b * b * b + c * c *c + d * d * d && b <= c <= d){ ^ Main.cc:12:27: error: expected primary-expression before ',' token cout<<"Cube = "<