結果
| 問題 | No.251 大きな桁の復習問題(1) |
| コンテスト | |
| ユーザー |
👑 tails
|
| 提出日時 | 2015-07-25 02:11:23 |
| 言語 | Perl (5.40.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 145 bytes |
| 記録 | |
| コンパイル時間 | 170 ms |
| コンパイル使用メモリ | 12,800 KB |
| 実行使用メモリ | 15,360 KB |
| 最終ジャッジ日時 | 2024-07-16 04:27:34 |
| 合計ジャッジ時間 | 2,917 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 WA * 1 |
コンパイルメッセージ
Main.pl syntax OK
ソースコード
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;
}
$n=<>;$m=<>;
print$n?$m?f$n%$p,$m%($p-1):1:0
tails