結果

問題 No.573 a^2[i] = a[i]
ユーザー tailstails
提出日時 2017-10-07 00:12:29
言語 Raku
(rakudo v2024.02)
結果
AC  
実行時間 700 ms / 2,000 ms
コード長 188 bytes
コンパイル時間 480 ms
コンパイル使用メモリ 135,988 KB
実行使用メモリ 148,436 KB
最終ジャッジ日時 2024-05-03 14:10:01
合計ジャッジ時間 23,058 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 418 ms
137,060 KB
testcase_01 AC 413 ms
137,960 KB
testcase_02 AC 411 ms
137,192 KB
testcase_03 AC 414 ms
137,572 KB
testcase_04 AC 412 ms
137,188 KB
testcase_05 AC 421 ms
138,988 KB
testcase_06 AC 416 ms
137,188 KB
testcase_07 AC 417 ms
139,296 KB
testcase_08 AC 414 ms
137,596 KB
testcase_09 AC 421 ms
139,100 KB
testcase_10 AC 418 ms
137,064 KB
testcase_11 AC 421 ms
137,188 KB
testcase_12 AC 407 ms
137,192 KB
testcase_13 AC 415 ms
137,192 KB
testcase_14 AC 418 ms
136,932 KB
testcase_15 AC 415 ms
136,804 KB
testcase_16 AC 411 ms
137,192 KB
testcase_17 AC 418 ms
137,192 KB
testcase_18 AC 416 ms
137,188 KB
testcase_19 AC 414 ms
137,960 KB
testcase_20 AC 409 ms
138,084 KB
testcase_21 AC 414 ms
137,700 KB
testcase_22 AC 411 ms
136,936 KB
testcase_23 AC 416 ms
137,956 KB
testcase_24 AC 422 ms
137,828 KB
testcase_25 AC 429 ms
137,576 KB
testcase_26 AC 418 ms
137,188 KB
testcase_27 AC 424 ms
137,832 KB
testcase_28 AC 426 ms
137,188 KB
testcase_29 AC 425 ms
137,188 KB
testcase_30 AC 434 ms
137,188 KB
testcase_31 AC 428 ms
137,576 KB
testcase_32 AC 428 ms
137,956 KB
testcase_33 AC 436 ms
137,832 KB
testcase_34 AC 446 ms
138,092 KB
testcase_35 AC 444 ms
138,484 KB
testcase_36 AC 443 ms
138,308 KB
testcase_37 AC 447 ms
138,356 KB
testcase_38 AC 448 ms
138,616 KB
testcase_39 AC 457 ms
138,692 KB
testcase_40 AC 455 ms
139,080 KB
testcase_41 AC 481 ms
142,832 KB
testcase_42 AC 512 ms
142,836 KB
testcase_43 AC 503 ms
142,832 KB
testcase_44 AC 556 ms
144,120 KB
testcase_45 AC 700 ms
148,436 KB
testcase_46 AC 417 ms
137,188 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