Casual Dancers

아직 제출이 없습니다시간 제한4초메모리 제한512 MB

문제

Three friends are studying random walks. To delve deeper into the topic, they have decided to play a game.

Initially, the friends stand at integer points x_1,x_2,x_3x\_1, x\_2, x\_3 on the number line.

The game lasts for kk seconds.

Each second, an integer jj is chosen uniformly at random from the set 1,2,3\\{ 1, 2, 3 \\}. Then, friend jj increases their coordinate by 11 with probability pp percent, or decreases their coordinate by 11 with probability (100p)(100 - p) percent.

Note that multiple friends can stand at the same point, both initially and during the game.

The stretch is defined as the length of the shortest segment on the number line containing all three friends.

Find the expected stretch after kk seconds, modulo 998,244,353998\\,244\\,353 (see the Output section for details).

입력

The first line contains three integers x_1x\_1, x_2x\_2, and x_3x\_3 (105x_i105-10^5 \le x\_i \le 10^5).

The second line contains a single integer kk (1k21051 \le k \le 2 \cdot 10^5).

The third line contains a single integer pp (0p1000 \le p \le 100).

출력

Print the expected stretch after kk seconds, modulo 998,244,353998\\,244\\,353.

Formally, let M=998,244,353M = 998\\,244\\,353. It can be shown that the required expected stretch can be expressed as an irreducible fraction pq\frac{p}{q}, where pp and qq are integers and q≢0(modM)q \not \equiv 0 \pmod{M}. Print the integer equal to pq1modMp \cdot q^{-1} \bmod M. In other words, print such an integer xx that 0x<M0 \le x < M and xqp(modM)x \cdot q \equiv p \pmod{M}.

힌트

In the first example test, regardless of which friend and direction are chosen, the stretch will be equal to 11.

In the second example test, the actual expected stretch is 43\frac{4}{3}.

In the third example test, the actual expected stretch is 27181\frac{271}{81}.