P6395 Ode to a Thousand-Year Recipe
Background
$$\texttt{Man plans Heaven decides}$$
$$\texttt{Time has flowed since ancient days, and in the blink of an eye}$$
$$\texttt{Only on the table}$$
$$\texttt{The thousand-year feast never changes}$$
“A-Ling, today is my $15$th $15$-year-old birthday!”
“Oh... A-Ling can’t go home today.”
At nine in the morning, Tianyi, still half-asleep, slowly opened her eyes and quietly poked the spot beside her, but only felt the pillow’s faint warmth.
“It’s my birthday, and you still have to work overtime...” She tossed the phone aside, folded the quilt, walked to the bedside, let her hands hang down, and gently pulled the curtain open. The dazzling sunlight easily scattered the other person’s lingering warmth.
“So boring!”
She endured it until night, only to find the fridge already completely empty. How about... taking a look around the food festival?
Today happened to be the annual food festival in the “Magic City” (Módū, Shanghai). She had thought A-Ling would go with her, and Tianyi had even prepared an extremely detailed plan. But now, with A-Ling not here, the plan fell through as well. Putting on a light casual outfit and bringing her wallet, Tianyi still decided she couldn’t wrong herself when it came to food!
Just as Tianyi’s hand rested on the doorknob and she gently pulled, the door suddenly flew open, and she was pulled into her lover’s arms...
Starlight, city lights, food, and... Tianyi’s small tongue lightly licked a blueberry-flavored cone while she secretly glanced at her lover beside her. A slender figure walked with graceful calm; the iconic red “ahoge” on her head flickered like a candle of hope. Under the sea of lights, they slowly flowed within those dark-red eyes... A-Ling turned around, her gaze meeting those emerald-green eyes.
“Tianyi, Tianyi. What are you thinking about?”
Seeing her lover shyly turn her face away, with her ears turning red unhelpfully, A-Ling’s mischievous thoughts rose again. She slowly moved closer to her lover’s face and lightly took a sip of her soft pink lips.
“What are you doing, A-Ling, there are so many people here...” Though she said that, Tianyi still unconsciously leaned toward A-Ling. A-Ling took her lover’s hand. “Come on, I’ll take you to eat through all of this place!”
Description
There are a total of $n$ stalls at the food festival. Initially (at time $0$), Tianyi has not tasted any of them. Tianyi’s flag is to taste them all. Therefore, **starting from time $1$**, at each moment, Tianyi will **choose one of the $n$ stalls uniformly at random to taste**. However, due to the large number of customers, many stalls will run short of ingredients and have to leave midway. **When a stall leaves, a new stall (one that has never appeared before) immediately enters**, and we call this a **leaving event**. A-Ling knows that all leaving events happen **between two adjacent moments**, and for each stall, the probability of leaving between any two moments is $p$.
Tianyi leaned her fluffy head closer and asked A-Ling, “In expectation, at which moment will I have tasted all $n$ stalls currently present?”
Input Format
One line with three integers $n,a,b$, meaning there are $n$ stalls, and the leaving probability is $p=\dfrac{a}{b}$.
Output Format
One line with one integer, meaning your answer.
**Since the answer may be a decimal, to avoid loss of precision, output the value of the answer modulo $998244353$.**
Explanation/Hint
#### Constraints
For different test points, we use the following data sizes and properties:
| Test Point ID | $n \leq$ | Special Property 1 | Special Property 2 |
| :------------------------------------: | :------: | :----------------: | :----------------: |
| $1 \sim 2$ | $500$ | $\sqrt{}$ | $\times$ |
| $3 \sim 8$ | $500$ | $\times$ | $\times$ |
| $9 \sim 11$ | $3000$ | $\times$ | $\sqrt{}$ |
| $12 \sim 25$ | $3000$ | $\times$ | $\times$ |
**Special Property 1**: $a=0$.
**Special Property 2**: $a=1,b=2$.
For $100\%$ of the data, $1 \le n \le 3000,0 \le a