给出三个整数 a,b,c。我们可以选择其中恰好一个数乘上某个整数 m(m 可为负、可为 0、也可为 1),然后允许对三个数任意重排。问能否得到一个等比数列。
关键等价: 三个数能重排成等比数列 (x,y,z) 当且仅当
y2=x⋅z给定三个整数 a、b、c ,你可以且必须恰好执行一次如下操作:
By signing up a CodeFun2000 universal account, you can submit code and join discussions in all online judging services provided by us.