Given three integers x,a,b.
Please print (xa+xa+1+xa+2+...+xb) mod 10
First line contains a number T, denoting the number of testcases.
Each testcase consists of the three numbers x, a, b in a line.
T<=1500
0 <= x,a,b <= 2147483647
a <= b
Testdatas don't contain 00.
For each test case, output a line contains one integer range from 0 to 9(inclusive).
3 3 4 5 4 5 6 5 6 8
4 0 5
Do you agree that it's an easy problem?
Migrated from old NTUJ.
dreamoon
No. | Testdata Range | Score |
---|