[Solution] Jogging CodeChef Solution | CodeChef Problem Solution 2022
Alice jogs everyday to keep herself fit and active. She noticed that she burns calories when jogging the first kilometer, and for , jogging the kilometer burns calories equivalent to the total number of calories burned while jogging the first kilometers.
What is the total number of calories that Alice burns after jogging for kilometers? The answer can be very large, so report it modulo ().
Input Format
- The first line of input will contain an integer — the number of test cases. The description of test cases follows.
Solution Click Below:- CLICK HERE
- The first and only line of each test case contains two space-separated integers and , as described in the problem statement.
Output Format
For each test case, output on a new line the total number of calories that Alice burns after jogging for kilometers, modulo .
No comments:
Post a Comment