結果

問題 No.420 mod2漸化式
ユーザー rlangevinrlangevin
提出日時 2023-01-05 20:27:57
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 287 bytes
コンパイル時間 1,656 ms
コンパイル使用メモリ 86,796 KB
実行使用メモリ 71,448 KB
最終ジャッジ日時 2023-08-19 17:37:09
合計ジャッジ時間 5,208 ms
ジャッジサーバーID
(参考情報)
judge10 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 64 ms
71,060 KB
testcase_01 AC 63 ms
71,240 KB
testcase_02 AC 64 ms
71,052 KB
testcase_03 AC 63 ms
71,200 KB
testcase_04 AC 64 ms
71,068 KB
testcase_05 AC 65 ms
71,276 KB
testcase_06 AC 64 ms
71,096 KB
testcase_07 AC 64 ms
71,264 KB
testcase_08 AC 63 ms
71,228 KB
testcase_09 AC 62 ms
71,200 KB
testcase_10 AC 62 ms
71,108 KB
testcase_11 AC 62 ms
71,128 KB
testcase_12 AC 61 ms
71,216 KB
testcase_13 AC 62 ms
71,244 KB
testcase_14 AC 61 ms
71,340 KB
testcase_15 AC 61 ms
71,064 KB
testcase_16 AC 66 ms
71,260 KB
testcase_17 AC 62 ms
71,208 KB
testcase_18 AC 63 ms
71,392 KB
testcase_19 AC 62 ms
71,256 KB
testcase_20 AC 63 ms
71,200 KB
testcase_21 AC 63 ms
70,988 KB
testcase_22 AC 63 ms
71,276 KB
testcase_23 AC 62 ms
71,256 KB
testcase_24 AC 62 ms
71,176 KB
testcase_25 AC 62 ms
71,240 KB
testcase_26 AC 63 ms
71,308 KB
testcase_27 AC 63 ms
71,264 KB
testcase_28 AC 65 ms
71,284 KB
testcase_29 AC 66 ms
71,128 KB
testcase_30 AC 62 ms
71,332 KB
testcase_31 AC 64 ms
71,064 KB
testcase_32 AC 63 ms
71,176 KB
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

def naive_comb(N, K):
    if K < 0:
        return 0
    ans = 1
    K = min(K, N - K)
    for i in range(K):
        ans *= N - i
        ans //= i + 1
    return ans


x = int(input())
if x >= 32:
    print(0)
    exit()
print(naive_comb(31, x), naive_comb(30, x - 1) * (pow(2, 31)-1))
0