結果
問題 |
No.2510 Six Cube Sum Counting
|
ユーザー |
|
提出日時 | 2023-10-20 23:17:40 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 574 bytes |
コンパイル時間 | 1,702 ms |
コンパイル使用メモリ | 166,776 KB |
実行使用メモリ | 10,140 KB |
最終ジャッジ日時 | 2024-09-20 22:43:01 |
合計ジャッジ時間 | 7,410 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 TLE * 1 -- * 1 |
other | -- * 26 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main(){ int X; cin >> X; int ans=0; for(int a=0; 6*a*a*a<=X && a<=300; a++){ int A=a*a*a; for(int b=a; A+5*b*b*b<=X && b<=300; b++){ int B=A+b*b*b; for(int c=b; B+4*c*c*c<=X && c<=300; c++){ int C=B+c*c*c; for(int d=c; C+3*d*d*d<=X && d<=300; d++){ int D=C+d*d*d; for(int e=d; D+2*e*e*e<=X && e<=300; e++){ int E=D+e*e*e; for(int f=e; E+f*f*f<=X && f<=300; f++){ int F=E+f*f*f; if(F==X)ans++; } } } } } } cout << ans << endl; return 0; }