結果
| 問題 | No.420 mod2漸化式 |
| コンテスト | |
| ユーザー |
sho_00
|
| 提出日時 | 2020-04-12 18:04:25 |
| 言語 | PyPy3 (7.3.23) |
| 結果 |
AC
|
| 実行時間 | 58 ms / 1,000 ms |
| + 597µs | |
| コード長 | 293 bytes |
| 記録 | |
| コンパイル時間 | 381 ms |
| コンパイル使用メモリ | 96,072 KB |
| 実行使用メモリ | 78,968 KB |
| 最終ジャッジ日時 | 2026-09-02 04:05:49 |
| 合計ジャッジ時間 | 4,505 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 35 |
ソースコード
import math
x=int(input())
if x==0:
print(' '.join(['1','0']))
elif x>31:
print(' '.join(['0','0']))
else:
cnt=math.factorial(31)//math.factorial(x)//math.factorial(31-x)
tot=(2**31-1)*math.factorial(30)//math.factorial(x-1)//math.factorial(31-x)
print(' '.join([str(cnt),str(tot)]))
sho_00