結果

問題 No.420 mod2漸化式
ユーザー AEnAEn
提出日時 2022-05-14 15:48:59
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 264 ms / 1,000 ms
コード長 219 bytes
コンパイル時間 140 ms
コンパイル使用メモリ 10,732 KB
実行使用メモリ 45,604 KB
最終ジャッジ日時 2023-09-30 07:21:18
合計ジャッジ時間 4,604 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 239 ms
45,436 KB
testcase_01 AC 239 ms
45,244 KB
testcase_02 AC 233 ms
45,272 KB
testcase_03 AC 223 ms
45,372 KB
testcase_04 AC 239 ms
45,456 KB
testcase_05 AC 242 ms
45,364 KB
testcase_06 AC 243 ms
45,368 KB
testcase_07 AC 234 ms
45,480 KB
testcase_08 AC 239 ms
45,388 KB
testcase_09 AC 246 ms
45,516 KB
testcase_10 AC 248 ms
45,400 KB
testcase_11 AC 248 ms
45,296 KB
testcase_12 AC 264 ms
45,412 KB
testcase_13 AC 240 ms
45,396 KB
testcase_14 AC 221 ms
45,204 KB
testcase_15 AC 236 ms
45,584 KB
testcase_16 AC 247 ms
45,348 KB
testcase_17 AC 251 ms
45,452 KB
testcase_18 AC 257 ms
45,396 KB
testcase_19 AC 234 ms
45,352 KB
testcase_20 AC 226 ms
45,324 KB
testcase_21 AC 230 ms
45,396 KB
testcase_22 AC 231 ms
45,472 KB
testcase_23 AC 239 ms
45,588 KB
testcase_24 AC 239 ms
45,548 KB
testcase_25 AC 234 ms
45,604 KB
testcase_26 AC 238 ms
45,312 KB
testcase_27 AC 240 ms
45,368 KB
testcase_28 AC 242 ms
45,456 KB
testcase_29 AC 239 ms
45,388 KB
testcase_30 AC 235 ms
45,504 KB
testcase_31 AC 233 ms
45,288 KB
testcase_32 AC 238 ms
45,584 KB
testcase_33 AC 233 ms
45,580 KB
testcase_34 AC 233 ms
45,440 KB
testcase_35 AC 231 ms
45,400 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from scipy.special import comb

x = int(input())
if x > 31:
    print(0, 0)
else:
    cnt = comb(31, x, exact=True)
    res = 0
    for i in range(31):
        res += 2**i * comb(30, x-1, exact=True)
    print(cnt, res)
0