結果

問題 No.251 大きな桁の復習問題(1)
ユーザー tailstails
提出日時 2015-07-25 01:59:10
言語 Perl
(5.38.2)
結果
WA  
実行時間 -
コード長 118 bytes
コンパイル時間 702 ms
コンパイル使用メモリ 11,232 KB
実行使用メモリ 13,788 KB
最終ジャッジ日時 2023-09-23 04:18:56
合計ジャッジ時間 3,258 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
11,204 KB
testcase_01 AC 41 ms
11,088 KB
testcase_02 AC 43 ms
11,096 KB
testcase_03 AC 41 ms
11,224 KB
testcase_04 WA -
testcase_05 AC 41 ms
11,232 KB
testcase_06 WA -
testcase_07 AC 42 ms
11,312 KB
testcase_08 AC 42 ms
11,320 KB
testcase_09 AC 81 ms
13,788 KB
testcase_10 AC 82 ms
13,588 KB
testcase_11 AC 83 ms
13,652 KB
testcase_12 AC 82 ms
13,728 KB
testcase_13 AC 81 ms
13,648 KB
testcase_14 AC 81 ms
13,652 KB
testcase_15 AC 81 ms
13,744 KB
testcase_16 AC 81 ms
13,544 KB
testcase_17 AC 82 ms
13,532 KB
testcase_18 AC 82 ms
13,756 KB
testcase_19 AC 82 ms
13,732 KB
testcase_20 AC 43 ms
11,224 KB
testcase_21 AC 42 ms
11,028 KB
testcase_22 AC 43 ms
11,172 KB
testcase_23 AC 41 ms
11,104 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

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