結果

問題 No.2510 Six Cube Sum Counting
ユーザー anonymouslyanonymously
提出日時 2023-10-20 23:15:15
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 559 bytes
コンパイル時間 1,792 ms
コンパイル使用メモリ 167,804 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-20 23:15:23
合計ジャッジ時間 2,792 ms
ジャッジサーバーID
(参考情報)
judge14 / judge10
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 2 ms
4,348 KB
testcase_04 AC 2 ms
4,348 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 2 ms
4,348 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 2 ms
4,348 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 2 ms
4,348 KB
testcase_17 AC 2 ms
4,348 KB
testcase_18 AC 2 ms
4,348 KB
testcase_19 AC 2 ms
4,348 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 2 ms
4,348 KB
testcase_29 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#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 Y=a*a*a;
		for(int b=a; Y+5*b*b*b<=X && b<=300; b++){
			Y+=(b*b*b);
			for(int c=b; Y+4*c*c*c<=X && c<=300; c++){
				Y+=(c*c*c);
				for(int d=c; Y+3*d*d*d<=X && d<=300; d++){
					Y+=(d*d*d);
					for(int e=d; Y+2*e*e*e<=X && e<=300; e++){
						Y+=(e*e*e);
						for(int f=e; Y+f*f*f<=X && f<=300; f++){
							Y+=(f*f*f);
							if(Y==X)ans++;
						}
					}
				}
			}
		}
	}
	cout << ans << endl;
	return 0;
	
}
0