結果
問題 |
No.129 お年玉(2)
|
ユーザー |
|
提出日時 | 2015-06-11 15:55:11 |
言語 | Python2 (2.7.18) |
結果 |
WA
|
実行時間 | - |
コード長 | 342 bytes |
コンパイル時間 | 44 ms |
コンパイル使用メモリ | 7,040 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-07-06 15:37:54 |
合計ジャッジ時間 | 2,248 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 WA * 2 |
other | AC * 4 WA * 42 |
ソースコード
# -*- 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)