cf/mirror

Weakened Common Divisor

CF
1025B1600· expert1.5s256 MB⌨ stdin/stdout

Examples

Sample 1of 3
Input
3
17 18
15 24
12 15
Output
6
Sample 2of 3
Input
2
10 16
7 17
Output
-1
Sample 3of 3
Input
5
90 108
45 105
75 40
165 175
33 30
Output
5
1025B.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)