結果
| 問題 |
No.420 mod2漸化式
|
| コンテスト | |
| ユーザー |
ヒッキープログラミングするスレ
|
| 提出日時 | 2016-09-09 23:39:44 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 312 bytes |
| コンパイル時間 | 295 ms |
| コンパイル使用メモリ | 12,288 KB |
| 実行使用メモリ | 10,752 KB |
| 最終ジャッジ日時 | 2024-11-16 18:42:01 |
| 合計ジャッジ時間 | 2,109 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 16 WA * 19 |
ソースコード
#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())
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)
ヒッキープログラミングするスレ