Concentric Circles

4.5

4 votes
Medium
Problem

You are given a very large piece of paper and you are given a task to divide the paper in partitions using 2 sets of concentric circles. Set1 of concentric circle is denoted by a and Set2 by b where a and b are the number of concentric circles in that set and radius of each circle in the set is an integer from 1 to a and 1 to b respectively. And then you are given a number c which denotes the distance between the centre of two sets of concentric circles. You need to print the total number of partitions of the pages after drawing these sets of concentric circles.

First line contains 't', the number of test cases. Each test case contains three integers a b c.

1<=t<=10

1<=a,b<=100000

1<=c<=200000

Author : Nikhil Tekwani

Time Limit: 1
Memory Limit: 256
Source Limit:
Explanation

Open the image by clicking here.

This image is enough to explain the above test case.

Editor Image

?