Counting Is Difficult III

rezwan4438 EWU Individual Programmin...
Limits 1s, 512 MB

East West University is organizing a programming contest today and the grumpy, angry moderator of the programming club is in action again.
This year, the contest is individual and divided into two categories - Senior and Junior. However, the moderator wants to know how many teams of exactly three participants can be formed by considering both seniors and juniors. Teams will not have any mixing of junior and senior category participants.

Can you help the moderator?


The first line will contain an integer T, representing the number of test cases.
On each of the following T lines, you will take two integers x and y as input, where x and y represent the number of participants in the junior and senior category, respectively.

  • 1 ≤ T ≤ 100
  • 0 ≤ x, y ≤ 106


For each x and y, you have to print the total number of teams that can be formed as formatted below.


3 3
3 4
Case 1: 2
Case 2: 5


Login to submit.


72% Solution Ratio
asif.mdEarliest, May '18
Tarik.amtolyFastest, 0.0s
KB_BBzLightest, 0 B
aNkanpy.pritomShortest, 135B
Toph uses cookies. By continuing you agree to our Cookie Policy.