結果
問題 |
No.420 mod2漸化式
|
ユーザー |
![]() |
提出日時 | 2023-01-05 20:26:33 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 256 bytes |
コンパイル時間 | 1,488 ms |
コンパイル使用メモリ | 82,464 KB |
実行使用メモリ | 53,448 KB |
最終ジャッジ日時 | 2024-11-29 11:50:46 |
合計ジャッジ時間 | 3,053 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 31 WA * 4 |
ソースコード
def naive_comb(N, K): ans = 1 K = min(K, N - K) for i in range(K): ans *= N - i ans //= i + 1 return ans x = int(input()) if x >= 32: print(0) exit() print(naive_comb(31, x), naive_comb(30, x - 1) * (pow(2, 31)-1))