結果
問題 |
No.129 お年玉(2)
|
ユーザー |
|
提出日時 | 2015-06-11 15:55:58 |
言語 | Python2 (2.7.18) |
結果 |
AC
|
実行時間 | 59 ms / 5,000 ms |
コード長 | 342 bytes |
コンパイル時間 | 196 ms |
コンパイル使用メモリ | 7,040 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-27 23:48:57 |
合計ジャッジ時間 | 3,102 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 46 |
ソースコード
# -*- coding:utf-8 -*- #from scipy.misc import comb なぜかこれを入れると通らない。 import math if __name__ == "__main__": n = input() m = input() n /= 1000 n %= m if n == 0: print 1 exit() else: # print comb(m,n) % (10**9) ans = math.factorial(m) / (math.factorial(n) * math.factorial(m-n)) print ans % (10**9)