結果
| 問題 |
No.420 mod2漸化式
|
| コンテスト | |
| ユーザー |
👑 SPD_9X2
|
| 提出日時 | 2025-08-02 15:14:31 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 41 ms / 1,000 ms |
| コード長 | 410 bytes |
| コンパイル時間 | 240 ms |
| コンパイル使用メモリ | 82,244 KB |
| 実行使用メモリ | 54,040 KB |
| 最終ジャッジ日時 | 2025-08-02 15:14:34 |
| 合計ジャッジ時間 | 3,116 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 35 |
ソースコード
"""
https://yukicoder.me/problems/no/420
xbit立っている数の集合
"""
# normal nCr
def nCr_Plane(n,r):
if n < r or n < 0:
return 0
import math
return math.factorial(n) // (math.factorial(n-r) * math.factorial(r))
x = int(input())
if x == 0:
print (1,0)
elif x > 31:
print (0,0)
else:
cnt = nCr_Plane(31,x)
s = nCr_Plane(30,x-1) * (2**31-1)
print (cnt,s)
SPD_9X2