302500: CF483A. Counterexample
Memory Limit:256 MB
Time Limit:1 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
Counterexample
题意翻译
题意: 求满足l<=a<b<c<=r 且gcd(a,b)=gcd(b,c)=1 gcd(a,c)≠1的任意一组a,b,c 输入:l,r(r-l<=50) 输出:其中一组a,b,c 若不存在,输出-1 数据范围:1<=l<a<b<c<=r<=10^18 感谢@牛的传说 提供的翻译题目描述
Your friend has recently learned about coprime numbers. A pair of numbers $ {a,b} $ is called coprime if the maximum number that divides both $ a $ and $ b $ is equal to one. Your friend often comes up with different statements. He has recently supposed that if the pair $ (a,b) $ is coprime and the pair $ (b,c) $ is coprime, then the pair $ (a,c) $ is coprime. You want to find a counterexample for your friend's statement. Therefore, your task is to find three distinct numbers $ (a,b,c) $ , for which the statement is false, and the numbers meet the condition $ l<=a<b<c<=r $ . More specifically, you need to find three numbers $ (a,b,c) $ , such that $ l<=a<b<c<=r $ , pairs $ (a,b) $ and $ (b,c) $ are coprime, and pair $ (a,c) $ is not coprime.输入输出格式
输入格式
The single line contains two positive space-separated integers $ l $ , $ r $ ( $ 1<=l<=r<=10^{18} $ ; $ r-l<=50 $ ).
输出格式
Print three positive space-separated integers $ a $ , $ b $ , $ c $ — three distinct numbers $ (a,b,c) $ that form the counterexample. If there are several solutions, you are allowed to print any of them. The numbers must be printed in ascending order. If the counterexample does not exist, print the single number -1.
输入输出样例
输入样例 #1
2 4
输出样例 #1
2 3 4
输入样例 #2
10 11
输出样例 #2
-1
输入样例 #3
900000000000000009 900000000000000029
输出样例 #3
900000000000000009 900000000000000010 900000000000000021