Guess
Practice
1 (4 votes)
Very Easy
Problem
46% Success 323 Attempts 10 Points 5s Time Limit 256MB Memory 1024 KB Max Code

Mr.Hola does not like Sameer at all and they always fight with each other. As Sammer is good in guessing the pattern so Mr. Hola gives him a pattern to guess. Help Sameer to find out the pattern.
input
The input file consists of several lines. The line number i contains a two positive integers a and b representing the i-th pair. [0<=a<=b<=10^6]
maximum query <=10^3
output
The output file should contain the same number of lines as the input file. The i-th line should contain one number – the required value of the pattern.

Input:
1 4
2 3
4 10
7 10
8 100
200 300
255 275

Output:

5
5
12
7
1043
4048
1060

Problem Setter : Avinash Gurjar

Please login to use the editor

You need to be logged in to access the code editor

Loading...

Please wait while we load the editor

Loading...
Results
Custom Input
Run your code to see the output
Submissions
Please login to view your submissions
Similar Problems
Points:10
3 votes
Tags:
MathC++Basic MathObservation
Points:10
15 votes
Tags:
Basic MathAlgorithmsMathamaticsMath
Points:10
23 votes
Tags:
Very-EasyMathematicsBasic MathSimple-mathMathematics