結果

問題 No.2188 整数列コイントスゲーム
ユーザー tailstails
提出日時 2023-01-13 22:33:36
言語 Perl
(5.38.2)
結果
AC  
実行時間 48 ms / 2,000 ms
コード長 233 bytes
コンパイル時間 327 ms
コンパイル使用メモリ 11,244 KB
実行使用メモリ 11,408 KB
最終ジャッジ日時 2023-08-26 04:16:59
合計ジャッジ時間 4,901 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
11,164 KB
testcase_01 AC 42 ms
11,196 KB
testcase_02 AC 41 ms
11,392 KB
testcase_03 AC 41 ms
11,200 KB
testcase_04 AC 42 ms
11,368 KB
testcase_05 AC 40 ms
11,208 KB
testcase_06 AC 42 ms
11,164 KB
testcase_07 AC 42 ms
11,168 KB
testcase_08 AC 41 ms
11,076 KB
testcase_09 AC 42 ms
11,160 KB
testcase_10 AC 42 ms
11,324 KB
testcase_11 AC 42 ms
11,076 KB
testcase_12 AC 42 ms
11,332 KB
testcase_13 AC 42 ms
11,388 KB
testcase_14 AC 43 ms
11,212 KB
testcase_15 AC 41 ms
11,080 KB
testcase_16 AC 41 ms
11,116 KB
testcase_17 AC 42 ms
11,240 KB
testcase_18 AC 43 ms
11,084 KB
testcase_19 AC 43 ms
11,408 KB
testcase_20 AC 44 ms
11,160 KB
testcase_21 AC 44 ms
11,100 KB
testcase_22 AC 44 ms
11,352 KB
testcase_23 AC 44 ms
11,328 KB
testcase_24 AC 44 ms
11,080 KB
testcase_25 AC 43 ms
11,084 KB
testcase_26 AC 44 ms
11,316 KB
testcase_27 AC 44 ms
11,368 KB
testcase_28 AC 45 ms
11,324 KB
testcase_29 AC 45 ms
11,196 KB
testcase_30 AC 44 ms
11,336 KB
testcase_31 AC 44 ms
11,232 KB
testcase_32 AC 44 ms
11,336 KB
testcase_33 AC 45 ms
11,164 KB
testcase_34 AC 45 ms
11,100 KB
testcase_35 AC 44 ms
11,192 KB
testcase_36 AC 47 ms
11,372 KB
testcase_37 AC 47 ms
11,100 KB
testcase_38 AC 47 ms
11,336 KB
testcase_39 AC 46 ms
11,212 KB
testcase_40 AC 47 ms
11,056 KB
testcase_41 AC 48 ms
11,164 KB
testcase_42 AC 47 ms
11,104 KB
testcase_43 AC 48 ms
11,160 KB
testcase_44 AC 48 ms
11,284 KB
testcase_45 AC 48 ms
11,208 KB
testcase_46 AC 47 ms
11,104 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

use bigint;

@f=1;
$f[$_]=$f[$_-1]*$_ for 1..15;

$n=<>;
$m=<>;
exit!print 1 if $n==0 && $m==0;
@a=(0,1);
for$i(2..$n){
	$z=0;
	for$j(0..$i-1){
		$z+=$f[$i]/($f[$j]*$f[$i-$j])*$a[$j];
	}
	$a[$i]=($i+0)**$n-$z;
}
print$m>$n?0:$a[$m];
0