結果
問題 |
No.420 mod2漸化式
|
ユーザー |
![]() |
提出日時 | 2016-09-09 23:52:54 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 389 bytes |
コンパイル時間 | 449 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-11-16 18:47:30 |
合計ジャッジ時間 | 2,663 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 17 WA * 15 RE * 3 |
ソースコード
#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()) assert x < 32 if x == 0: print(1, 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)