結果

問題 No.1092 modular arithmetic
ユーザー yuruhiyayuruhiya
提出日時 2021-04-17 20:32:05
言語 Ruby
(3.3.0)
結果
AC  
実行時間 983 ms / 2,000 ms
コード長 91 bytes
コンパイル時間 55 ms
コンパイル使用メモリ 11,312 KB
実行使用メモリ 29,820 KB
最終ジャッジ日時 2023-09-17 06:09:07
合計ジャッジ時間 20,929 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
15,028 KB
testcase_01 AC 727 ms
28,808 KB
testcase_02 AC 66 ms
15,032 KB
testcase_03 AC 809 ms
29,820 KB
testcase_04 AC 716 ms
27,672 KB
testcase_05 AC 655 ms
27,716 KB
testcase_06 AC 499 ms
22,888 KB
testcase_07 AC 678 ms
27,744 KB
testcase_08 AC 740 ms
29,004 KB
testcase_09 AC 631 ms
27,244 KB
testcase_10 AC 557 ms
22,216 KB
testcase_11 AC 610 ms
21,964 KB
testcase_12 AC 490 ms
23,104 KB
testcase_13 AC 609 ms
25,440 KB
testcase_14 AC 732 ms
26,824 KB
testcase_15 AC 208 ms
17,796 KB
testcase_16 AC 512 ms
21,088 KB
testcase_17 AC 690 ms
27,328 KB
testcase_18 AC 803 ms
29,308 KB
testcase_19 AC 495 ms
23,128 KB
testcase_20 AC 808 ms
29,544 KB
testcase_21 AC 656 ms
26,776 KB
testcase_22 AC 746 ms
29,112 KB
testcase_23 AC 822 ms
21,824 KB
testcase_24 AC 295 ms
18,680 KB
testcase_25 AC 651 ms
22,716 KB
testcase_26 AC 842 ms
26,344 KB
testcase_27 AC 199 ms
16,228 KB
testcase_28 AC 632 ms
22,436 KB
testcase_29 AC 983 ms
28,788 KB
testcase_30 AC 656 ms
22,520 KB
testcase_31 AC 141 ms
16,140 KB
testcase_32 AC 559 ms
22,460 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

P=gets.to_i;p gets.split.reduce{c=$<.getc;eval(_1.to_s+(c<?/?c+_2: ?*+_2+".pow(P-2,P)"))%P}
0