結果

問題 No.727 仲介人moko
ユーザー 0w10w1
提出日時 2018-08-25 07:50:54
言語 Ruby
(3.3.0)
結果
AC  
実行時間 331 ms / 1,000 ms
コード長 156 bytes
コンパイル時間 287 ms
コンパイル使用メモリ 11,336 KB
実行使用メモリ 23,012 KB
最終ジャッジ日時 2023-09-06 18:06:30
合計ジャッジ時間 6,167 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 65 ms
15,164 KB
testcase_01 AC 70 ms
15,320 KB
testcase_02 AC 67 ms
15,152 KB
testcase_03 AC 72 ms
15,276 KB
testcase_04 AC 64 ms
15,076 KB
testcase_05 AC 66 ms
15,080 KB
testcase_06 AC 67 ms
15,076 KB
testcase_07 AC 65 ms
15,312 KB
testcase_08 AC 68 ms
15,128 KB
testcase_09 AC 67 ms
15,316 KB
testcase_10 AC 64 ms
15,024 KB
testcase_11 AC 67 ms
15,148 KB
testcase_12 AC 67 ms
15,080 KB
testcase_13 AC 66 ms
15,148 KB
testcase_14 AC 184 ms
18,984 KB
testcase_15 AC 255 ms
21,108 KB
testcase_16 AC 161 ms
18,140 KB
testcase_17 AC 181 ms
18,876 KB
testcase_18 AC 148 ms
17,616 KB
testcase_19 AC 284 ms
21,852 KB
testcase_20 AC 188 ms
18,712 KB
testcase_21 AC 130 ms
17,096 KB
testcase_22 AC 117 ms
16,976 KB
testcase_23 AC 314 ms
22,712 KB
testcase_24 AC 331 ms
23,012 KB
testcase_25 AC 227 ms
20,584 KB
testcase_26 AC 279 ms
21,320 KB
testcase_27 AC 235 ms
20,328 KB
testcase_28 AC 73 ms
15,384 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

M = (1e9 + 7).to_i
n = gets.to_i
ans = (1..n).map { |i| i * 2 - 1 } .inject(1) { |o, e| o * e % M } * (1..n).inject(1) { |o, e| o * e % M }**2 % M
puts ans
0