結果

問題 No.1092 modular arithmetic
ユーザー %20%20
提出日時 2020-06-24 10:13:52
言語 Ruby
(3.3.0)
結果
AC  
実行時間 1,084 ms / 2,000 ms
コード長 92 bytes
コンパイル時間 55 ms
コンパイル使用メモリ 11,236 KB
実行使用メモリ 29,784 KB
最終ジャッジ日時 2023-09-16 20:59:27
合計ジャッジ時間 22,703 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 78 ms
15,024 KB
testcase_01 AC 820 ms
28,536 KB
testcase_02 AC 76 ms
15,072 KB
testcase_03 AC 883 ms
29,616 KB
testcase_04 AC 718 ms
27,628 KB
testcase_05 AC 720 ms
27,588 KB
testcase_06 AC 526 ms
22,460 KB
testcase_07 AC 731 ms
27,772 KB
testcase_08 AC 837 ms
28,660 KB
testcase_09 AC 705 ms
26,852 KB
testcase_10 AC 612 ms
21,972 KB
testcase_11 AC 647 ms
21,620 KB
testcase_12 AC 546 ms
22,864 KB
testcase_13 AC 657 ms
25,468 KB
testcase_14 AC 790 ms
27,132 KB
testcase_15 AC 218 ms
17,664 KB
testcase_16 AC 560 ms
21,052 KB
testcase_17 AC 752 ms
27,320 KB
testcase_18 AC 861 ms
29,784 KB
testcase_19 AC 538 ms
22,800 KB
testcase_20 AC 926 ms
29,656 KB
testcase_21 AC 709 ms
26,444 KB
testcase_22 AC 829 ms
29,048 KB
testcase_23 AC 866 ms
21,628 KB
testcase_24 AC 332 ms
18,800 KB
testcase_25 AC 691 ms
22,628 KB
testcase_26 AC 904 ms
26,528 KB
testcase_27 AC 198 ms
16,404 KB
testcase_28 AC 694 ms
22,636 KB
testcase_29 AC 1,084 ms
29,088 KB
testcase_30 AC 732 ms
22,396 KB
testcase_31 AC 155 ms
16,380 KB
testcase_32 AC 633 ms
22,692 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

P=gets.to_i
p gets.split.inject{|a,b|eval("#{a}"+((c=$<.getc)<?/?c+b:"*#{b}.pow(P-2,P)"))%P}
0