結果
| 問題 |
No.895 MESE
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-09-30 03:12:10 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 781 bytes |
| コンパイル時間 | 226 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 34,560 KB |
| 最終ジャッジ日時 | 2024-10-03 04:51:31 |
| 合計ジャッジ時間 | 8,076 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 3 |
| other | RE * 26 |
ソースコード
# 入力の分解
output_max = 1000000000 + 7
s = input()
s = s.split()
inp = [int(tmp) for tmp in s]
a = inp[0]
b = inp[1]
c = inp[2]
# 階乗のチートシート作成
my_fact = [1, 1]
tmp = 1
for i in range(2, 300000):
tmp *= i
tmp %= output_max
my_fact.append(tmp)
# 2のべき乗のチートシート作成
my_2xp = [1]
tmp = 1
for i in range(1, 300000):
tmp *= 2
tmp %= output_max
my_2xp.append(tmp)
res = 0
for i in range(2, a+2):
k = a + b + c - i
# tmp = 1
# tmp = ((tmp << k) - 1) % output_max
tmp = my_2xp[k] - 1
tmp = (tmp * my_fact[k - 1]) % output_max
res += my_div(tmp, my_fact[a - i + 1], output_max)
res %= output_max
res = my_div(res, (my_fact[b - 1] * my_fact[c - 1]) % output_max, output_max)
print(res)