結果
| 問題 | No.420 mod2漸化式 |
| コンテスト | |
| ユーザー |
sho_00
|
| 提出日時 | 2020-04-12 18:04:25 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 38 ms / 1,000 ms |
| コード長 | 293 bytes |
| 記録 | |
| コンパイル時間 | 470 ms |
| コンパイル使用メモリ | 85,248 KB |
| 実行使用メモリ | 52,224 KB |
| 最終ジャッジ日時 | 2026-04-10 09:41:54 |
| 合計ジャッジ時間 | 3,097 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / 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