Check if a given number is a perfect square with only addition or substraction operation. eg. 25 returns true; 19 returns false. Perfect square number 有一个特性,比如0,1,4,9,16,25 他们之间的间隔分别是1,3,5,7,9,每次间隔都是i+2. 所以每次往下减i, i 更新成i+2. 看最后结果是否为0即可. import java.u…