結果
| 問題 |
No.420 mod2漸化式
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-02-07 10:02:33 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 344 bytes |
| コンパイル時間 | 153 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 11,008 KB |
| 最終ジャッジ日時 | 2024-09-14 08:32:56 |
| 合計ジャッジ時間 | 2,435 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 29 RE * 6 |
ソースコード
def fact(x):
if x == 1:
return 1
else:
return fact(x-1) * x
def combination(n, k):
return fact(n) // (fact(n-k) * fact(k))
def main():
x = int(input())
# f(n) = x となるnの個数は31Ck
count = combination(31, x)
cumsum = (2**31 - 1) * combination(30, x-1)
print(count, cumsum);
main()