結果

問題 No.2188 整数列コイントスゲーム
ユーザー 👑 KazunKazun
提出日時 2023-01-13 23:13:01
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 75 ms / 2,000 ms
コード長 1,412 bytes
コンパイル時間 1,255 ms
コンパイル使用メモリ 86,960 KB
実行使用メモリ 71,540 KB
最終ジャッジ日時 2023-08-26 04:56:39
合計ジャッジ時間 6,253 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,508 KB
testcase_01 AC 74 ms
71,248 KB
testcase_02 AC 73 ms
71,272 KB
testcase_03 AC 73 ms
71,264 KB
testcase_04 AC 72 ms
71,080 KB
testcase_05 AC 74 ms
71,272 KB
testcase_06 AC 74 ms
71,440 KB
testcase_07 AC 74 ms
71,368 KB
testcase_08 AC 73 ms
71,252 KB
testcase_09 AC 72 ms
71,272 KB
testcase_10 AC 73 ms
71,192 KB
testcase_11 AC 74 ms
71,472 KB
testcase_12 AC 73 ms
71,424 KB
testcase_13 AC 75 ms
71,304 KB
testcase_14 AC 73 ms
71,268 KB
testcase_15 AC 74 ms
71,128 KB
testcase_16 AC 74 ms
71,512 KB
testcase_17 AC 73 ms
71,352 KB
testcase_18 AC 73 ms
71,348 KB
testcase_19 AC 73 ms
71,432 KB
testcase_20 AC 73 ms
71,220 KB
testcase_21 AC 75 ms
71,376 KB
testcase_22 AC 73 ms
71,444 KB
testcase_23 AC 73 ms
71,508 KB
testcase_24 AC 73 ms
71,192 KB
testcase_25 AC 72 ms
71,524 KB
testcase_26 AC 72 ms
71,464 KB
testcase_27 AC 73 ms
71,188 KB
testcase_28 AC 72 ms
71,080 KB
testcase_29 AC 73 ms
71,368 KB
testcase_30 AC 73 ms
71,356 KB
testcase_31 AC 72 ms
71,432 KB
testcase_32 AC 73 ms
71,344 KB
testcase_33 AC 73 ms
71,128 KB
testcase_34 AC 74 ms
71,264 KB
testcase_35 AC 74 ms
71,508 KB
testcase_36 AC 74 ms
71,296 KB
testcase_37 AC 73 ms
71,188 KB
testcase_38 AC 73 ms
71,540 KB
testcase_39 AC 74 ms
71,316 KB
testcase_40 AC 74 ms
71,188 KB
testcase_41 AC 72 ms
71,216 KB
testcase_42 AC 73 ms
71,372 KB
testcase_43 AC 74 ms
71,440 KB
testcase_44 AC 74 ms
71,300 KB
testcase_45 AC 74 ms
71,220 KB
testcase_46 AC 71 ms
71,276 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def solve():
    N=int(input())
    M=int(input())

    if N<M:
        return 0
    X=[[1],
        [0,1],
        [0,1,2],
        [0,1,6,6],
        [0,1,14,36,24],
        [0,1,30,150,240,120],
        [0,1,62,540,1560,1800,720],
        [0, 1, 126, 1806, 8400, 16800, 15120, 5040],
        [0, 1, 254, 5796, 40824, 126000, 191520, 141120, 40320],
        [0, 1, 510, 18150, 186480, 834120, 1905120, 2328480, 1451520, 362880],
        [0, 1, 1022, 55980, 818520, 5103000, 16435440, 29635200, 30240000, 16329600, 3628800],
        [0, 1, 2046, 171006, 3498000, 29607600, 129230640, 322494480, 479001600, 419126400, 199584000, 39916800],
        [0, 1, 4094, 519156, 14676024, 165528000, 953029440, 3162075840, 6411968640, 8083152000, 6187104000, 2634508800, 479001600],
        [0, 1, 8190, 1569750, 60780720, 901020120, 6711344640, 28805736960, 76592355840, 130456085760, 142702560000, 97037740800, 37362124800, 6227020800],
        [0, 1, 16382, 4733820, 249401880, 4809004200, 45674188560, 248619571200, 843184742400, 1863435974400, 2731586457600, 2637143308800, 1612798387200, 566658892800, 87178291200],
        [0, 1, 32766, 14250606, 1016542800, 25292030400, 302899156560, 2060056318320, 8734434508800, 24359586451200, 45950224320000, 59056027430400, 50999300352000, 28332944640000, 9153720576000, 1307674368000]]

    return X[N][M]

#==================================================
print(solve())
0