結果

問題 No.251 大きな桁の復習問題(1)
ユーザー tailstails
提出日時 2015-07-25 02:02:04
言語 Perl
(5.38.2)
結果
WA  
実行時間 -
コード長 123 bytes
コンパイル時間 292 ms
コンパイル使用メモリ 11,124 KB
実行使用メモリ 13,812 KB
最終ジャッジ日時 2023-09-23 04:19:24
合計ジャッジ時間 2,796 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
11,116 KB
testcase_01 WA -
testcase_02 AC 43 ms
11,224 KB
testcase_03 AC 41 ms
11,140 KB
testcase_04 AC 41 ms
11,104 KB
testcase_05 AC 41 ms
11,116 KB
testcase_06 AC 42 ms
11,356 KB
testcase_07 AC 41 ms
11,016 KB
testcase_08 AC 41 ms
11,220 KB
testcase_09 AC 83 ms
13,564 KB
testcase_10 AC 82 ms
13,728 KB
testcase_11 AC 83 ms
13,680 KB
testcase_12 AC 82 ms
13,568 KB
testcase_13 AC 82 ms
13,812 KB
testcase_14 AC 82 ms
13,608 KB
testcase_15 AC 83 ms
13,620 KB
testcase_16 AC 82 ms
13,672 KB
testcase_17 AC 82 ms
13,492 KB
testcase_18 AC 82 ms
13,568 KB
testcase_19 AC 82 ms
13,784 KB
testcase_20 AC 41 ms
11,180 KB
testcase_21 AC 41 ms
11,340 KB
testcase_22 AC 43 ms
11,064 KB
testcase_23 AC 41 ms
11,084 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

use bigint;
$p=129402307;
sub f{
	my($n,$m)=@_;
	$n?$m?$m&1?f($n,$m-1)*$n%$p:f($n*$n%$p,$m/2):1:0;
}
print f<>%$p,<>%($p-1)
0