Welcome to ZOJ
Information
Problems
Runs
Statistics
Ranklist
Clarification
60 - ZOJ Monthly, June 2007 - 1008
A very easy task

Time Limit: 10 Seconds      Memory Limit: 32768 KB

This task is very simple.

You are to calculate ��ik (1 <= i <= n).

Input:

There are multiple cases in the input.

Each case begins with two integer n and k (0 <= n <= 1050, 1 <= k <= 100).

Output:

For each test, print the answer in a single line.

Sample Input:

2 3
3 2

Sample Output:

9
14

Author: SHANG, Zechao


Submit    Status