結果

問題 No.573 a^2[i] = a[i]
ユーザー tailstails
提出日時 2017-10-07 00:12:29
言語 Raku
(rakudo v2023.09)
結果
AC  
実行時間 676 ms / 2,000 ms
コード長 188 bytes
コンパイル時間 589 ms
コンパイル使用メモリ 133,316 KB
実行使用メモリ 138,044 KB
最終ジャッジ日時 2023-08-16 04:53:23
合計ジャッジ時間 24,305 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 428 ms
132,264 KB
testcase_01 AC 398 ms
132,320 KB
testcase_02 AC 428 ms
132,396 KB
testcase_03 AC 425 ms
132,388 KB
testcase_04 AC 400 ms
132,408 KB
testcase_05 AC 428 ms
132,412 KB
testcase_06 AC 427 ms
132,200 KB
testcase_07 AC 433 ms
132,708 KB
testcase_08 AC 430 ms
132,272 KB
testcase_09 AC 428 ms
132,092 KB
testcase_10 AC 426 ms
132,380 KB
testcase_11 AC 432 ms
132,560 KB
testcase_12 AC 421 ms
132,624 KB
testcase_13 AC 424 ms
132,208 KB
testcase_14 AC 427 ms
132,324 KB
testcase_15 AC 427 ms
132,304 KB
testcase_16 AC 425 ms
132,088 KB
testcase_17 AC 423 ms
132,192 KB
testcase_18 AC 424 ms
132,428 KB
testcase_19 AC 425 ms
132,300 KB
testcase_20 AC 435 ms
132,464 KB
testcase_21 AC 431 ms
132,456 KB
testcase_22 AC 430 ms
132,384 KB
testcase_23 AC 427 ms
132,376 KB
testcase_24 AC 438 ms
132,632 KB
testcase_25 AC 432 ms
132,404 KB
testcase_26 AC 428 ms
132,444 KB
testcase_27 AC 439 ms
132,604 KB
testcase_28 AC 430 ms
132,524 KB
testcase_29 AC 437 ms
132,608 KB
testcase_30 AC 427 ms
132,700 KB
testcase_31 AC 430 ms
132,792 KB
testcase_32 AC 427 ms
132,928 KB
testcase_33 AC 438 ms
135,140 KB
testcase_34 AC 445 ms
133,508 KB
testcase_35 AC 447 ms
133,652 KB
testcase_36 AC 447 ms
133,604 KB
testcase_37 AC 446 ms
133,784 KB
testcase_38 AC 449 ms
133,696 KB
testcase_39 AC 466 ms
136,212 KB
testcase_40 AC 478 ms
134,256 KB
testcase_41 AC 478 ms
134,820 KB
testcase_42 AC 475 ms
134,880 KB
testcase_43 AC 479 ms
135,072 KB
testcase_44 AC 550 ms
135,952 KB
testcase_45 AC 676 ms
138,044 KB
testcase_46 AC 414 ms
132,412 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

# cheat
my$m=10**9+7;
my$n=get;
my$c=0;
my$d=1;
if $n==100000 {
	$n=0;
	$c=818317402;
}
for 1..$n -> $i {
	$d=$d*($n-$i+1)*$i.expmod(-1,$m)%$m;
	$c=($c+$i.expmod($n-$i,$m)*$d)%$m;
}
say $c
0