主页 讨论版 问题 名次 状态 统计

请自觉遵守比赛规则,违者严惩,不接受求情!

问题 A: Chinese Paladin – Qi’s troubles

问题 A: Chinese Paladin – Qi’s troubles

时间限制:1000 ms 内存限制:128 MB
提交:201 解决:45
[ 提交][ 状态][ 讨论版]

题目描述

As we all know, Xiahou Jinxuan (Chinese Paladin 5 Prequel’s protagonist) and Yue Jinzhao

(Chinese Paladin 6’s protagonist) are the most intelligent in Legend series. But who is more NB?

However,it's not enough that only themselves are NB ,they believe that who's wife is more

intelligent,who is more NB.
So they ask their wives to compete. In this case, Xia (Xiahou Jinxuan 's wife) said to Qi

(Yue Jinzhao 's wife) , "Well, I have a problem, if you can answer it, I will admit that your husband is more NB than my husband." Xia is confident, because Qi is only three years old (why is Qi too

young but has a husband, please play Chinese Paladin 6), even if she is a genius, she certainly can't answer it.
Here is the problem: Give you a number n, then constructed a number sequence as following : n, n + 1, n + 2,n + 1, n + 2, n + 3, n + 2, n + 3, n + 4 ...
calculate the sum of the first m items of this number sequence , and outputs the result mod 23333333333, 1 <= n, m <= 10 ^ 12.
Please help Qi to solve the problem, Qi doesn’t want to make Jinzhao ashamed ~

输入

Multiple test cases, please read until EOF

For each test case: One line contains two single integer n, m separated by space

(1 <= n, m <= 10 ^ 12)

输出

For each test case:

One line contains a single integer, the answer.

样例输入

1 500

样例输出

42416

提示

the data is too large

[ 提交][ 状态][ 讨论版]
Baidu
map