cf/mirror

Divisible Numbers (hard version)

CF
1744E21900· candidate master4s256 MB⌨ stdin/stdout

Examples

Sample 1of 1multi-test • hover to link
Input
10
1 1 2 2
3 4 5 7
8 9 15 18
12 21 14 24
36 60 48 66
1024 729 373248 730
1024 729 373247 730
5040 40320 40319 1000000000
999999999 999999999 1000000000 1000000000
268435456 268435456 1000000000 1000000000
Output
2 2
4 6
12 12
-1 -1
-1 -1
373248 730
-1 -1
15120 53760
-1 -1
536870912 536870912
1744E2.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)