結果

問題 No.895 MESE
ユーザー pluto77pluto77
提出日時 2019-11-22 09:39:21
言語 PyPy2
(7.3.15)
結果
AC  
実行時間 465 ms / 2,000 ms
コード長 314 bytes
コンパイル時間 605 ms
コンパイル使用メモリ 76,800 KB
実行使用メモリ 153,728 KB
最終ジャッジ日時 2024-04-19 10:10:49
合計ジャッジ時間 10,886 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 112 ms
152,448 KB
testcase_01 AC 113 ms
153,088 KB
testcase_02 AC 112 ms
152,376 KB
testcase_03 AC 113 ms
152,744 KB
testcase_04 AC 112 ms
152,360 KB
testcase_05 AC 108 ms
152,524 KB
testcase_06 AC 112 ms
152,844 KB
testcase_07 AC 112 ms
152,504 KB
testcase_08 AC 114 ms
153,600 KB
testcase_09 AC 118 ms
153,728 KB
testcase_10 AC 122 ms
153,344 KB
testcase_11 AC 120 ms
153,088 KB
testcase_12 AC 115 ms
153,344 KB
testcase_13 AC 231 ms
153,600 KB
testcase_14 AC 397 ms
152,832 KB
testcase_15 AC 427 ms
153,600 KB
testcase_16 AC 298 ms
153,728 KB
testcase_17 AC 162 ms
153,344 KB
testcase_18 AC 446 ms
152,960 KB
testcase_19 AC 437 ms
153,368 KB
testcase_20 AC 455 ms
153,000 KB
testcase_21 AC 449 ms
153,600 KB
testcase_22 AC 456 ms
152,964 KB
testcase_23 AC 465 ms
153,728 KB
testcase_24 AC 443 ms
153,472 KB
testcase_25 AC 443 ms
153,728 KB
testcase_26 AC 446 ms
153,128 KB
testcase_27 AC 447 ms
153,088 KB
testcase_28 AC 447 ms
153,600 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#yuki895

def combi(n,r,m):
 return fact[n]*pow(fact[r],m-2,m)*pow(fact[n-r],m-2,m)

mod=10**9+7
a,b,c=map(int,raw_input().split())
fact=[1]
for i in range(1,10**6):
 fact.append(i*fact[-1]%mod)

res=0
for i in range(b+c-1,a+b+c-1):
 res+=(pow(2,i,mod)-1)*combi(i-1,b-1,mod)*combi(i-b,c-1,mod)
 res%=mod
print res
0