Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
138760 田祥江 完美立方 C++ Time Limit Exceeded 1000 MS 256 KB 337 2025-11-29 17:10:56

Tests(0/10):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ int n,a,b,c,d; scanf("%d",&n); for(a=1;a<=n;a++){ for(b=1;b<a;b++){ for(c=b;b<a;c++){ for(d=c;d<a;d++){ if(a*a*a==b*b*b+c*c*c+d*d*d){ printf("Cube = %d, Triple = (%d,%d,%d) "); } } } } } return 0; }