結果
問題 |
No.420 mod2漸化式
|
ユーザー |
![]() |
提出日時 | 2016-09-09 23:42:48 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 403 bytes |
コンパイル時間 | 201 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-11-16 18:44:20 |
合計ジャッジ時間 | 2,169 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 20 WA * 15 |
ソースコード
#code def combi(n, k): x = n r = 1 for i in range(1, min(31 - k, k) + 1): r *= x r //= i x -= 1 return r x = int(input()) if x == 0: print(1, 0) elif x > 31: print(0, 0) else: ans_count = combi(31, x) ans_sum = 0 multi = combi(30, x - 1) for i in range(31): t = 1 << i ans_sum += t * multi print(ans_count, ans_sum)