Hack
Now
EN
Login
Register
HackNow
Bell soni $B_N \bmod P$ | HackNow
Go back
Reading Mode
bar_chart
Problem
Statistics
send
Total
1
check_circle
AC
1
trending_up
Acceptance
100.0%
timer
Time
0ms
memory
Memory
8.2MB
Problem
Submissions
Bell soni $B_N \bmod P$
lock
UZ only
Oson
100%
accepted
100 points
5 s
256 MB
Number Theory (Advanced)
Input format
Output format
Constraints
Examples
1
1
Example #1
Input
4 1000000007
Output
15
Solution editor
Python 3
Clear
Language
PYTHON
UTF-8
Tab
4 spaces
Ctrl
+
Enter
Submit
Submit