#P6392. 中意

中意

Description

The sentences related to the task have been bolded.

  “First, there is a magical number aa.”
  “Tianyi is very hungry, so give Tianyi 2a+22^{a+2} egg tarts.
  “I want more!”
  “Then… there is another magical number bb. Tianyi can get bb times as many egg tarts!
  “Wow! Then I have k=b×2a+2k=b \times 2^{a+2} egg tarts!
  “Tianyi also likes round hundreds. So let’s round it up. Give p=k25×100p=\lceil \frac{k}{25}\rceil \times 100 egg tarts!
  “A-Ling, you’re the best!”
  “Here~ for you.” A-Ling smiled and stroked Tianyi’s head, taking only a few egg tarts out of the bag.
  “Huh?!”
  “Finally, Tianyi can’t eat too much. So pp should be taken modulo 998344353\color{black} 998 \color{red}3 \color{black} 44353.
  “…As expected, you’re a bad girl.”

Now Tianyi wants to know: for the given aa and bb from A-Ling, how many egg tarts can she actually eat? In other words, what is the result of $p \bmod \color{black} 998 \color{red}3 \color{black} 44353$?

Note: x\lceil x \rceil means rounding xx up.

Input Format

One line with two integers, representing bb and aa.

Please note the input order.

Output Format

One line with one integer pp, representing the number of egg tarts Tianyi can get.

30 1

1000
60 15

31457300
2020 412
133047246

Hint

Sample Explanation #2

k=60×2(15+2)=7864320k=60 \times 2^{(15+2)}=7864320, p=k25×100=31457300p=\lceil \frac{k}{25} \rceil \times 100 =31457300.


Constraints

This problem uses bundled testdata.

  • Subtask 1 (20 Points), a,b100a,b \leq 100 and b0(mod25)b \equiv 0 \pmod{25}.
  • Subtask 2 (50 Points), b109b \leq 10^9.
  • Subtask 3 (30 Points), the testdata has no special constraints.

For 100%100\% of the testdata, 20b101001020 \leq b \leq 10^{10010}, 1a1018+81 \leq a \leq 10^{18}+8.


Problem Background (Continued)

  Still looking extremely conflicted at the sweet and greasy breakfast in Tianyi’s hands, “Eating something this sweet early in the morning, taking in too much sugar will promote arteriosclerosis, it will…”
  Luo Tianyi cut her off: “Then do you want it to be even sweeter?”
  “Huh?”
  Luo Tianyi stood on tiptoe and gently left a kiss on her right cheek. “Yuezheng Ling, I’m really fond of you.”
  Yuezheng Ling froze for a moment and asked: “What did you say?”
  Luo Tianyi blushed a little, turned around, and took small bites of her egg tart: “If you don’t get it, then forget it.”
  “I’m also really fond of you.” A voice as soft as a feather brushed across the tips of their hearts.
  The egg tart in her mouth really did become a few degrees sweeter and greasier.

Translated by ChatGPT 5