| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 | 
|---|---|---|---|---|---|---|---|---|
| 135143 | 徐英杰 | 完美立方 | C++ | Time Limit Exceeded | 1000 MS | 280 KB | 608 | 2025-11-02 16:47:44 | 
#include <iostream> #include<cmath> using namespace std; void OJ1491(int n) { for (int a = 2;a <= n;a++) { for (int b = 2;b <= n;b++) { for (int c = b;c <= n;c++) { for (int d = c;d<= n;d++) { bool tiaojian=( pow(a,3) == pow(b,3) + pow(c,3) + pow(d,3) ); if (tiaojian) { cout<<"Cube = "<<a<<", Triple = ("<<b<<","<<c<<","<<d<<")"<<endl; } } } } } } int main() { int N; cin>>N; OJ1491(N); return 0; }