小凯有一天突发奇想,写下了一串数字:lns="http://www.w3.org/1998/Math/MathML">l(l+1)(l+2)...(r-1)rl(l+1)(l+2)...(r−1)r
例如:lns="http://www.w3.org/1998/Math/MathML">l=2,r=5l=2,r=5时,数字为:lns="http://www.w3.org/1998/Math/MathML">23452345
lns="http://www.w3.org/1998/Math/MathML">l=8,r=12l=8,r=12时数字为:lns="http://www.w3.org/1998/Math/MathML">8910111289101112
小凯很喜欢数字 lns="http://www.w3.org/1998/Math/MathML">99,所以他想问你他写下的数字除以 lns="http://www.w3.org/1998/Math/MathML">99 的余数是多少
例如:lns="http://www.w3.org/1998/Math/MathML">l=2,r=5l=2,r=5时,lns="http://www.w3.org/1998/Math/MathML">2345\,\,mod\,\,9 = 52345mod9=5
第一行为数字 lns="http://www.w3.org/1998/Math/MathML">QQ,表示小凯有 lns="http://www.w3.org/1998/Math/MathML">QQ 个问题
第 lns="http://www.w3.org/1998/Math/MathML">22 到 lns="http://www.w3.org/1998/Math/MathML">Q+1Q+1 行,每行两个数字 lns="http://www.w3.org/1998/Math/MathML">l,rl,r 表示数字范围
3 1 999 123 456 13579 24680
0 6 0
样例1解释:lns="http://www.w3.org/1998/Math/MathML">2345\,\,mod\,\,9 = 52345mod9=5 lns="http://www.w3.org/1998/Math/MathML">89101112\,\,mod\,\,9 = 589101112mod9=5
30% 数据满足:lns="http://www.w3.org/1998/Math/MathML">Q\leq10;l,r\leq100Q≤10;l,r≤100
50% 数据满足:lns="http://www.w3.org/1998/Math/MathML">Q\leq100;l,r\leq10000Q≤100;l,r≤10000
70% 数据满足:lns="http://www.w3.org/1998/Math/MathML">Q\leq1000;l,r\leq10^6Q≤1000;l,r≤106
100%数据满足:lns="http://www.w3.org/1998/Math/MathML">Q\leq10000;0<l,r\leq10^{12}Q≤10000;0<l,r≤1012 且 lns="http://www.w3.org/1998/Math/MathML">l\leq rl≤r