4C and his Queries

4.7

3 votes
Easy
Problem

4C is famous for his witty answers. To test his wit, people from all around the globe asks him different type of questions which he answers cleverly every time. This time he was asked queries related to a function. Function F is defined as :

There will be Q queries.

For each query, L and R will be given. 4C needs to print the count of numbers i such that L <= i <= R and F(i) is a multiple of 7.

CONSTRAINTS:

1 <= Q <= 105

0 <= L <= R <= 1018

Problem Setter - Somya

Time Limit: 1
Memory Limit: 256
Source Limit:
Editor Image

?