题意 : 判断 n 个数组成的序列是否为等比数列;
思路: a[i]a[i] = a[i-1]a[i+1];
代码:
import java.util.Scanner;import java.math.*;public class Main { public static void main(String args[]){ BigDecimal a,b,c; Scanner cin = new Scanner(System.in); int t = cin.nextInt(); while(t>0){ t--; BigDecimal [] ar = new BigDecimal[110] ; int n = cin.nextInt(); int cnt = 0; for(int i=0;i