#P16781. ⌈Xzy OI R1 T3⌋ 穿穿表
⌈Xzy OI R1 T3⌋ 穿穿表
Problem Description
Ciyaqiu has a Pascal’s triangle placed in the fourth quadrant of the Cartesian coordinate system. Inside the triangle, is placed at the coordinate , as shown in the figure:

Ciyaqiu has two non-negative integers . He wants to use the line to pass through this Pascal’s triangle. Please tell him the result of the sum of all numbers on this line modulo . is a prime number, and Ciyaqiu does not know why he has to use it.
Input Format
One line with two non-negative integers .
Output Format
One line with one non-negative integer representing the answer.
2 6
6
Hint
【Constraints】
This problem uses bundled testdata, meaning you must pass all test points in a subtask to obtain the score for that subtask.
::cute-table{tuack}
| Subtask | Score | ||
|---|---|---|---|
| ^ | |||
Translated by ChatGPT 5