結果

問題 No.129 お年玉(2)
ユーザー 古寺いろは古寺いろは
提出日時 2015-04-05 22:57:44
言語 Python2
(2.7.18)
結果
AC  
実行時間 55 ms / 5,000 ms
コード長 225 bytes
コンパイル時間 941 ms
コンパイル使用メモリ 6,644 KB
実行使用メモリ 6,056 KB
最終ジャッジ日時 2023-08-18 17:04:32
合計ジャッジ時間 3,856 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 12 ms
5,828 KB
testcase_01 AC 55 ms
5,944 KB
testcase_02 AC 12 ms
5,964 KB
testcase_03 AC 11 ms
5,884 KB
testcase_04 AC 11 ms
5,952 KB
testcase_05 AC 28 ms
5,856 KB
testcase_06 AC 23 ms
6,000 KB
testcase_07 AC 36 ms
6,016 KB
testcase_08 AC 35 ms
6,024 KB
testcase_09 AC 20 ms
5,892 KB
testcase_10 AC 40 ms
6,032 KB
testcase_11 AC 25 ms
5,828 KB
testcase_12 AC 12 ms
6,024 KB
testcase_13 AC 11 ms
5,852 KB
testcase_14 AC 23 ms
5,832 KB
testcase_15 AC 22 ms
5,976 KB
testcase_16 AC 27 ms
6,036 KB
testcase_17 AC 19 ms
6,016 KB
testcase_18 AC 36 ms
5,880 KB
testcase_19 AC 43 ms
5,832 KB
testcase_20 AC 31 ms
6,028 KB
testcase_21 AC 20 ms
5,860 KB
testcase_22 AC 29 ms
5,976 KB
testcase_23 AC 38 ms
5,876 KB
testcase_24 AC 46 ms
6,000 KB
testcase_25 AC 24 ms
5,944 KB
testcase_26 AC 31 ms
5,868 KB
testcase_27 AC 30 ms
6,056 KB
testcase_28 AC 30 ms
5,880 KB
testcase_29 AC 12 ms
6,048 KB
testcase_30 AC 11 ms
6,024 KB
testcase_31 AC 11 ms
5,868 KB
testcase_32 AC 12 ms
5,932 KB
testcase_33 AC 12 ms
5,932 KB
testcase_34 AC 11 ms
6,020 KB
testcase_35 AC 12 ms
5,932 KB
testcase_36 AC 11 ms
5,872 KB
testcase_37 AC 11 ms
5,816 KB
testcase_38 AC 14 ms
5,892 KB
testcase_39 AC 12 ms
5,972 KB
testcase_40 AC 16 ms
5,876 KB
testcase_41 AC 20 ms
5,864 KB
testcase_42 AC 15 ms
5,900 KB
testcase_43 AC 11 ms
5,932 KB
testcase_44 AC 52 ms
6,004 KB
testcase_45 AC 13 ms
5,936 KB
testcase_46 AC 12 ms
5,996 KB
testcase_47 AC 47 ms
6,056 KB
testcase_48 AC 35 ms
6,000 KB
権限があれば一括ダウンロードができます

ソースコード

diff #


def perm(N, K):
    i = 0
    ret = 1
    while i < K:
        ret *= N - i
        ret /= i + 1
        i = i + 1
    return ret


N = int(raw_input())
M = int(raw_input())

N /= 1000
N %= M

print(perm(M, N) % 1000000000)
0