Hope you get it solution codechef 2021
Chef created a new dish and he is willing to give the recipe for the same. The ingredients for the recipe are product of numbers in a pair. A pair consists of two integers saythen the ingredient is and . After this chef mixes all the ingredients to make the dish.
Here mixing the ingredients means summation of all ingredients present in the dish. Also the dish will be best if it made from all possiblefrom a given range including and .
As chef is now making the dish , he asked you to calculate the value of summation till dish is ready to be served. Since the summation can be large, output the SUM Modulo 1000000007 ().
Input: Hope you get it solution codechef 2021
- First line will contain , number of testcases. Then the testcases follow.
- Each testcase contains of a single line of input, two integers .
Output: Hope you get it solution codechef 2021
For each testcase, output in a single line SUM modulo 1000000007.
Constraints Hope you get it solution codechef 2021
Sample Input: Hope you get it solution codechef 2021
1 3 7
Sample Output: Hope you get it solution codechef 2021
, (twice for reverse pairs)
Program Code :
We don not promote cheating in any sense, so try you best and if your want solution you can check it after a day.
ALL THE BEST.