One problem from Number theory

Revision en2, by Mamedov, 2016-07-31 12:09:29

How to calculate http://codeforces.me/predownloaded/72/22/72229c1ee97025cc5df1b89399cc826996bdc8f3.jpg this sum? Constraints are 1 ≤ N, M ≤ 2·10^9, and 1 ≤ x ≤ 50;

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en14 English Mamedov 2016-08-01 13:19:11 0 (published)
en13 English Mamedov 2016-08-01 12:29:46 0 Tiny change: ' * 10^{9}$ and $1 \le x ' -> ' * 10^{9}$, $1 \le x '
en12 English Mamedov 2016-08-01 12:29:15 5 Tiny change: ' * 10^{9}$ and $1 \le x ' -> ' * 10^{9}$, $1 \le x '
en11 English Mamedov 2016-08-01 12:28:46 0 Tiny change: 's 1 second \b\nPlease c' -> 's 1 second.\n\nPlease c'
en10 English Mamedov 2016-08-01 12:28:28 6 Tiny change: 's 1 second \b\nPlease c' -> 's 1 second.\n\nPlease c'
en9 English Mamedov 2016-08-01 12:27:25 4
en8 English Mamedov 2016-08-01 12:24:06 8 Tiny change: ' \bmod M$ this sum?\n\nConst' -> ' \bmod M$ ?\n\nConst'
en7 English Mamedov 2016-08-01 12:23:41 82
en6 English Mamedov 2016-08-01 12:22:43 49
en5 English Mamedov 2016-08-01 12:21:55 175 (saved to drafts)
en4 English Mamedov 2016-07-31 12:19:53 0 (published)
en3 English Mamedov 2016-07-31 12:17:47 28 Tiny change: '1 ≤ x ≤ 50;' -> '1 ≤ x ≤ 50.\nPlease can someone help?'
en2 English Mamedov 2016-07-31 12:09:29 0 Tiny change: 'his sum?\nConstrai' -> 'his sum?\n\nConstrai' (saved to drafts)
en1 English Mamedov 2016-07-31 12:07:42 196 Initial revision (published)