結果

問題 No.129 お年玉(2)
ユーザー rocoder
提出日時 2017-07-29 06:10:38
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 377 bytes
コンパイル時間 341 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-10-10 21:20:57
合計ジャッジ時間 3,146 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 5 WA * 41
権限があれば一括ダウンロードができます

ソースコード

diff #

# your code goes here
N=int (input ())
M=int(input())
N//=1000
N%=M
if N==0:
   print(1)
else:
    L=1000000000
    if N>=M//2:
        N=M-N
 #   print(N)
    Mb=1
    for i in range (N):
        Mb*=M-i
   #     print(M)
        if Mb>1000000000:
            Mb%=1000000000
    for i in range (N):
        Mb//=N-i
  #  if Mb>1000000000:
    #    N%=1000000000
    print (Mb)
0