結果

問題 No.391 CODING WAR
ユーザー cielciel
提出日時 2016-07-09 12:48:14
言語 PyPy2
(7.3.15)
結果
TLE  
実行時間 -
コード長 149 bytes
コンパイル時間 720 ms
コンパイル使用メモリ 77,056 KB
実行使用メモリ 83,328 KB
最終ジャッジ日時 2024-04-21 10:40:17
合計ジャッジ時間 5,424 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 88 ms
81,280 KB
testcase_01 AC 88 ms
75,400 KB
testcase_02 AC 88 ms
75,432 KB
testcase_03 AC 90 ms
75,520 KB
testcase_04 AC 90 ms
75,648 KB
testcase_05 AC 88 ms
75,904 KB
testcase_06 AC 88 ms
75,648 KB
testcase_07 AC 90 ms
75,520 KB
testcase_08 AC 90 ms
75,648 KB
testcase_09 TLE -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
n,m=map(int,sys.stdin.readline().split())
M=10**9+7
r=0
s=c=1
for k in range(m):
	r=(r+s*c*pow(m-k,n,M))%M
	c=c*(m-k)/(k+1)
	s=-s
print(r)
0