C. Student
- Giới hạn thời gian
- 1,0 s
- Giới hạn bộ nhớ
- 256 MB
- Điểm
- 1một phần
- Tỉ lệ AC
- 56,5%
- Người giải
- 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
Bình luận