import java.util.*; // 注意类名必须为 Main, 不要有任何 package xxx 信息 public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); long x = in.nextInt(); long y = in.nextInt(); int n = in.nextInt(); int[] timesArray = new int[n]; int i = 0; while (i < n) { // 注意 while 处理多个 case timesArray[i] = in.nextInt(); i++; // int b = in.nextInt(); // System.out.println(a + b); } if (x >= y) { System.out.println(0); return; } Arrays.sort(timesArray); int times = 0; int lastNum = -1; for (int j = timesArray.length - 1; j >= 0; j--) { int CurNum = timesArray[j]; if (CurNum == lastNum) { continue; } x *= CurNum; times++; lastNum = CurNum; if (x >= y) { break; } } if (x < y) { times = -1; } System.out.println(times); // 注意 hasNext 和 hasNextLine 的区别 // while (in.hasNextInt()) { // 注意 while 处理多个 case // int a = in.nextInt(); // int b = in.nextInt(); // System.out.println(a + b); // } } }