結果
問題 |
No.420 mod2漸化式
|
ユーザー |
![]() |
提出日時 | 2023-01-05 20:27:57 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 287 bytes |
コンパイル時間 | 326 ms |
コンパイル使用メモリ | 82,304 KB |
実行使用メモリ | 52,096 KB |
最終ジャッジ日時 | 2024-11-29 11:53:36 |
合計ジャッジ時間 | 2,998 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 32 WA * 3 |
ソースコード
def naive_comb(N, K): if K < 0: return 0 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))