結果
問題 |
No.420 mod2漸化式
|
ユーザー |
|
提出日時 | 2022-04-21 14:38:53 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 290 bytes |
コンパイル時間 | 253 ms |
コンパイル使用メモリ | 82,576 KB |
実行使用メモリ | 53,812 KB |
最終ジャッジ日時 | 2024-06-22 18:42:40 |
合計ジャッジ時間 | 2,751 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 31 WA * 4 |
ソースコード
x = int(input()) import sys if x > 31: print(0) exit() if x == 0: print(0) exit() ans = 0 comb = 1 for i in range(x- 1): comb *= (30 - i) for i in range(x - 1): comb //= (i + 1) for i in range(31): ans += (1 << i) * comb count = comb * 31 // x print(count,ans)