結果

問題 No.2188 整数列コイントスゲーム
ユーザー tailstails
提出日時 2023-01-13 22:30:51
言語 Perl
(5.38.2)
結果
WA  
実行時間 -
コード長 227 bytes
コンパイル時間 601 ms
コンパイル使用メモリ 11,376 KB
実行使用メモリ 11,504 KB
最終ジャッジ日時 2023-08-26 04:14:23
合計ジャッジ時間 5,361 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
11,164 KB
testcase_01 AC 41 ms
11,176 KB
testcase_02 AC 41 ms
11,080 KB
testcase_03 AC 41 ms
11,208 KB
testcase_04 AC 41 ms
11,168 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 40 ms
11,100 KB
testcase_08 AC 40 ms
11,204 KB
testcase_09 AC 40 ms
11,204 KB
testcase_10 AC 44 ms
11,368 KB
testcase_11 AC 41 ms
11,104 KB
testcase_12 AC 37 ms
11,168 KB
testcase_13 AC 36 ms
11,104 KB
testcase_14 AC 37 ms
11,084 KB
testcase_15 WA -
testcase_16 AC 36 ms
11,368 KB
testcase_17 AC 36 ms
11,192 KB
testcase_18 AC 36 ms
11,176 KB
testcase_19 AC 38 ms
11,388 KB
testcase_20 AC 37 ms
11,196 KB
testcase_21 AC 38 ms
11,192 KB
testcase_22 AC 38 ms
11,104 KB
testcase_23 AC 37 ms
11,100 KB
testcase_24 AC 38 ms
11,204 KB
testcase_25 AC 38 ms
11,192 KB
testcase_26 AC 38 ms
11,076 KB
testcase_27 AC 36 ms
11,180 KB
testcase_28 AC 39 ms
11,160 KB
testcase_29 AC 38 ms
11,076 KB
testcase_30 AC 39 ms
11,196 KB
testcase_31 AC 38 ms
11,360 KB
testcase_32 AC 38 ms
11,208 KB
testcase_33 AC 40 ms
11,368 KB
testcase_34 AC 41 ms
11,204 KB
testcase_35 AC 41 ms
11,272 KB
testcase_36 AC 41 ms
11,216 KB
testcase_37 AC 42 ms
11,376 KB
testcase_38 AC 41 ms
11,104 KB
testcase_39 AC 42 ms
11,104 KB
testcase_40 AC 44 ms
11,100 KB
testcase_41 AC 52 ms
11,208 KB
testcase_42 AC 57 ms
11,080 KB
testcase_43 AC 40 ms
11,272 KB
testcase_44 AC 40 ms
11,364 KB
testcase_45 AC 42 ms
11,212 KB
testcase_46 AC 43 ms
11,404 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

use bigint;

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

$n=<>;
exit!print"NaN" if $n==0;
$m=<>;
@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