結果

問題 No.420 mod2漸化式
ユーザー kohei2019kohei2019
提出日時 2022-01-23 13:45:25
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 76 ms / 1,000 ms
コード長 298 bytes
コンパイル時間 895 ms
コンパイル使用メモリ 86,840 KB
実行使用メモリ 71,420 KB
最終ジャッジ日時 2023-08-19 18:30:42
合計ジャッジ時間 4,990 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
70,876 KB
testcase_01 AC 74 ms
71,300 KB
testcase_02 AC 74 ms
71,240 KB
testcase_03 AC 74 ms
71,360 KB
testcase_04 AC 75 ms
70,952 KB
testcase_05 AC 74 ms
71,324 KB
testcase_06 AC 75 ms
71,304 KB
testcase_07 AC 75 ms
71,080 KB
testcase_08 AC 74 ms
71,124 KB
testcase_09 AC 74 ms
71,256 KB
testcase_10 AC 74 ms
70,900 KB
testcase_11 AC 74 ms
71,396 KB
testcase_12 AC 75 ms
71,152 KB
testcase_13 AC 74 ms
71,304 KB
testcase_14 AC 74 ms
71,420 KB
testcase_15 AC 75 ms
71,144 KB
testcase_16 AC 74 ms
71,048 KB
testcase_17 AC 74 ms
71,232 KB
testcase_18 AC 74 ms
71,340 KB
testcase_19 AC 74 ms
71,144 KB
testcase_20 AC 73 ms
71,152 KB
testcase_21 AC 75 ms
71,200 KB
testcase_22 AC 73 ms
71,116 KB
testcase_23 AC 74 ms
71,212 KB
testcase_24 AC 74 ms
71,216 KB
testcase_25 AC 74 ms
71,228 KB
testcase_26 AC 76 ms
71,152 KB
testcase_27 AC 76 ms
70,896 KB
testcase_28 AC 76 ms
71,080 KB
testcase_29 AC 73 ms
71,188 KB
testcase_30 AC 74 ms
71,104 KB
testcase_31 AC 72 ms
71,208 KB
testcase_32 AC 73 ms
71,148 KB
testcase_33 AC 73 ms
71,236 KB
testcase_34 AC 74 ms
71,156 KB
testcase_35 AC 72 ms
71,268 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

x = int(input())
if x == 0:
    print(1,0)
    exit()
if x > 31:
    print(0,0)
    exit()
a = 1
for i in range(1,x+1):
    a *= 32-i
for i in range(1,x+1):
    a //= i
b = 1
for i in range(1,x):
    b *= 31-i
for i in range(1,x):
    b //= i
an = 0
for i in range(31):
    an += b*2**i
print(a,an)
0