public static void main(String[] args) {

		Scanner in = new Scanner(System.in);
		int total = in.nextInt();

		for (int counter = 0; counter < total; counter++) {
			int totalDay = in.nextInt();
			int cards = in.nextInt();
			if (totalDay == 0) {
				System.out.println(100);
				continue;
			}

			int[] days = new int[totalDay];
			for (int i = 0; i < totalDay; i++) {
				days[i] = in.nextInt();
			}
			if (cards >= totalDay) {
				System.out.println(100);
				continue;
			}

			//
			System.out.println(calc(cards, days));
		}
	}