|시간 제한||메모리 제한||제출||정답||맞은 사람||정답 비율|
|5 초||256 MB||358||318||296||91.077%|
Given a sphere, you can slice through the surface of the sphere to make different convex polyhedra. All of these convex polyhedra have the Euler characteristic which can be defined as follows:
x = V − E + F = 2
where V represents the number of vertices, E the number of edges and F the number of faces on a convex polyhedron.
Input begins with a line with a single integer T, 1 ≤ T ≤ 100, denoting the number of test cases. Each test case consists of a single line with two space-separated integers V and E (4 ≤ V, E ≤ 100), representing the number of vertices and edges respectively of the convex polyhedron.
For each test case, print on a single line the number of faces in the defined polyhedron.
2 8 12 4 6