C. Student
- Time limit
- 1.0 s
- Memory limit
- 256 MB
- Points
- 1partial
- AC rate
- 56.5%
- Solvers
- 168
In a classroom with male students and
female students, the teacher is organizing a discussion activity where each pair consists of one male and one female student.
Determine the number of ways to select one male and one female student to form a pair.
Input
- The input starts with a positive integer
— the number of test cases. Each test case is printed in a single line with two integers
and
.
Output
- For each test case, print a single integer on a line — the number of ways to select one male and one female student to form a pair.
Example
Input
3
1 1
3 4
19 14Output
1
12
266
Comments