結果

問題 No.2510 Six Cube Sum Counting
ユーザー tailstails
提出日時 2023-10-20 22:55:40
言語 cLay
(20240104-1)
結果
TLE  
実行時間 -
コード長 267 bytes
コンパイル時間 4,789 ms
コンパイル使用メモリ 172,584 KB
実行使用メモリ 8,608 KB
最終ジャッジ日時 2023-10-20 22:56:44
合計ジャッジ時間 17,660 ms
ジャッジサーバーID
(参考情報)
judge15 / judge10
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,348 KB
testcase_01 AC 2 ms
4,348 KB
testcase_02 TLE -
testcase_03 AC 2 ms
4,348 KB
testcase_04 AC 2 ms
4,348 KB
testcase_05 AC 2 ms
4,348 KB
testcase_06 AC 243 ms
4,348 KB
testcase_07 AC 2 ms
4,348 KB
testcase_08 AC 234 ms
4,348 KB
testcase_09 AC 2 ms
4,348 KB
testcase_10 AC 3 ms
4,348 KB
testcase_11 AC 9 ms
4,348 KB
testcase_12 AC 4 ms
4,348 KB
testcase_13 AC 3 ms
4,348 KB
testcase_14 AC 5 ms
4,348 KB
testcase_15 AC 2 ms
4,348 KB
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 1 ms
4,348 KB
testcase_20 AC 1,444 ms
4,348 KB
testcase_21 TLE -
testcase_22 TLE -
testcase_23 AC 2,248 ms
4,348 KB
testcase_24 TLE -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

ll f(ll x,ll m,ll d){
	if(x==0){
		return 1;
	}
	if(x%9>d&&x%9<9-d){
		return 0;
	}
	if(x%7>d&&x%7<7-d){
		return 0;
	}
	ll r=0;
	rrep(a,m+1){
		if(x-a*a*a*d>0){
			break;
		}
		if(x-a*a*a>=0){
			r+=f(x-a*a*a,a,d-1);
		}
	}
	return r;
}

{
	ll@x;
	wt(f(x,300,6));
}
0