結果

問題 No.573 a^2[i] = a[i]
ユーザー tailstails
提出日時 2017-10-07 00:06:15
言語 Raku
(rakudo v2024.02)
結果
WA  
実行時間 -
コード長 402 bytes
コンパイル時間 596 ms
コンパイル使用メモリ 135,664 KB
実行使用メモリ 138,940 KB
最終ジャッジ日時 2023-08-16 04:52:11
合計ジャッジ時間 24,018 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 453 ms
134,888 KB
testcase_01 AC 445 ms
134,932 KB
testcase_02 AC 438 ms
135,044 KB
testcase_03 AC 428 ms
134,944 KB
testcase_04 AC 428 ms
134,960 KB
testcase_05 AC 430 ms
134,712 KB
testcase_06 AC 434 ms
134,604 KB
testcase_07 AC 432 ms
135,044 KB
testcase_08 AC 429 ms
134,860 KB
testcase_09 AC 425 ms
134,804 KB
testcase_10 AC 434 ms
134,784 KB
testcase_11 AC 426 ms
134,764 KB
testcase_12 AC 438 ms
134,872 KB
testcase_13 AC 428 ms
134,876 KB
testcase_14 AC 428 ms
134,808 KB
testcase_15 AC 426 ms
134,916 KB
testcase_16 AC 426 ms
134,692 KB
testcase_17 AC 440 ms
134,892 KB
testcase_18 AC 436 ms
134,792 KB
testcase_19 AC 445 ms
134,768 KB
testcase_20 AC 440 ms
134,824 KB
testcase_21 AC 445 ms
134,840 KB
testcase_22 AC 445 ms
134,808 KB
testcase_23 AC 446 ms
134,780 KB
testcase_24 AC 443 ms
134,944 KB
testcase_25 AC 438 ms
134,900 KB
testcase_26 AC 430 ms
135,056 KB
testcase_27 AC 437 ms
135,036 KB
testcase_28 AC 441 ms
134,852 KB
testcase_29 AC 444 ms
134,952 KB
testcase_30 AC 432 ms
134,920 KB
testcase_31 AC 428 ms
134,916 KB
testcase_32 AC 439 ms
135,196 KB
testcase_33 AC 449 ms
135,488 KB
testcase_34 AC 466 ms
135,600 KB
testcase_35 AC 470 ms
135,772 KB
testcase_36 AC 469 ms
135,756 KB
testcase_37 AC 474 ms
134,360 KB
testcase_38 AC 469 ms
135,780 KB
testcase_39 AC 506 ms
135,700 KB
testcase_40 AC 519 ms
136,496 KB
testcase_41 AC 535 ms
136,280 KB
testcase_42 AC 588 ms
136,768 KB
testcase_43 AC 584 ms
137,140 KB
testcase_44 AC 666 ms
138,940 KB
testcase_45 WA -
testcase_46 AC 431 ms
134,832 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

my $ds=[1,803016460,114878453,169452473,677656472,149033233,677656472,169452473,114878453,803016460,1];
my $cs=[0,108187056,517118688,684352284,641063587,651656589,971586099,64216974,303566513,593448378,818317402];

my$m=10**9+7;
my$n=+get;
my$c=$cs[$n div 10000];
my$d=$ds[$n div 10000];
$n%=10000;
for 1..$n -> $i {
	$d=$d*($n-$i+1)*$i.expmod($m-2,$m)%$m;
	$c=($c+$i.expmod($n-$i,$m)*$d)%$m;
}
say $c
0