結果
| 問題 |
No.2872 Depth of the Parentheses
|
| コンテスト | |
| ユーザー |
sasa8uyauya
|
| 提出日時 | 2024-09-06 21:58:22 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 482 ms / 2,000 ms |
| コード長 | 321 bytes |
| コンパイル時間 | 317 ms |
| コンパイル使用メモリ | 82,656 KB |
| 実行使用メモリ | 134,804 KB |
| 最終ジャッジ日時 | 2024-09-06 21:58:42 |
| 合計ジャッジ時間 | 19,478 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 TLE * 5 |
ソースコード
x,k=map(int,input().split())
M=998244353
a=0
for i in range(1<<(2*k)):
p=0
maxp=0
minp=2*k
for j in range(2*k):
if (i>>j)&1:
p+=1
else:
p-=1
maxp=max(maxp,p)
minp=min(minp,p)
if p==0 and minp==0:
a+=maxp*pow(x*pow(100,M-2,M),k,M)*pow((100-x)*pow(100,M-2,M),k,M)
a%=M
print(a)
sasa8uyauya