#P6392. 中意

中意

Background

(The background is adapted from Baidu Tieba / Nanbei Group Backup Bar / Cute Nanbei Daily / F8984, author 落墨成白.)

  At a time like this, in a situation like this, she and she stared at each other face to face without moving a step. There was only one possibility—she was waiting.
  Waiting for her to ask for help, waiting for her to give in, waiting for her to do it willingly.
  Luo Tianyi thought this person really deserved a beating for the way she did things, looking at the words that popped up on the phone screen: “Why aren’t you coming over yet?”
  She replied rudely: “Where do you want me to come over to?”
  “If there were any other way to go besides coming to my side.”
  Of course, even though Miss Yuezheng, who was the one compromising, kept muttering, carrying the shuangpinai (double-skin milk) and egg tarts she bought on the way, she still obediently took the first step.
  As soon as the door opened, the little foodie indeed obediently threw herself into her arms.
  “You can’t eat them all. Let’s play a game!”
  “You bad girl, A-Ling.”

Problem 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