結果
問題 | No.420 mod2漸化式 |
ユーザー |
![]() |
提出日時 | 2025-03-20 18:44:46 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 41 ms / 1,000 ms |
コード長 | 219 bytes |
コンパイル時間 | 145 ms |
コンパイル使用メモリ | 82,184 KB |
実行使用メモリ | 54,044 KB |
最終ジャッジ日時 | 2025-03-20 18:44:57 |
合計ジャッジ時間 | 2,600 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 35 |
ソースコード
import math x = int(input()) if x == 0: print(1, 0) elif x < 0 or x > 31: print(0, 0) else: count = math.comb(31, x) c = math.comb(30, x - 1) total_sum = c * (2**31 - 1) print(count, total_sum)