시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 128 MB 1052 825 761 80.614%

문제

승택이의 아들이 생일을 맞았다. 승택이는 아들을 위해 생일 파티를 하려고 한다.

하지만 아들의 친구들을 모두 초대할 수는 없다. 아이들에게 나눠 줄 사탕이 부족하기 때문이다.

아이들은 항상 한 종류의 사탕만을 먹고 싶어한다. 게다가, 한 종류의 사탕을 최소한 K개 이상 먹어야만 행복해한다.

K가 주어지고 승택이가 현재 갖고 있는 사탕의 종류와 개수가 주어진다. 이 때, 생일파티에 올 수 있는 아이들은 최대 몇 명일까?

입력

첫 줄에 테스트 케이스의 수 T가 주어진다. ( 1 ≤ T ≤ 100 )

각 테스트 케이스의 첫 줄엔 승택이가 갖고 있는 사탕의 종류의 수 N과 K가 주어진다. ( 1 ≤ N, K ≤ 100 )

두번째 줄엔 N개의 정수로 승택이가 각 종류의 사탕을 몇 개 갖고 있는지가 주어진다.

모든 종류에 대해, 사탕은 최소 1개 최대 100개이다.

출력

각 테스트 케이스마다 생일파티에 최대 몇 명의 아이들이 참석할 수 있는지 하나의 정수로 출력한다.

예제 입력 1

2
3 2
4 5 7
3 8
4 5 7

예제 출력 1

7
0
W3sicHJvYmxlbV9pZCI6Ijk1NTAiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJcdWM1NDRcdWM3NzRcdWI0ZTRcdWM3NDAgXHVjMGFjXHVkMGQ1XHVjNzQ0IFx1Yzg4Ylx1YzU0NFx1ZDU3NCIsImRlc2NyaXB0aW9uIjoiPHA+XHVjMmI5XHVkMGRkXHVjNzc0XHVjNzU4IFx1YzU0NFx1YjRlNFx1Yzc3NCBcdWMwZGRcdWM3N2NcdWM3NDQgXHViOWRlXHVjNTU4XHViMmU0LiBcdWMyYjlcdWQwZGRcdWM3NzRcdWIyOTQgXHVjNTQ0XHViNGU0XHVjNzQ0IFx1YzcwNFx1ZDU3NCBcdWMwZGRcdWM3N2MgXHVkMzBjXHVkMmYwXHViOTdjIFx1Z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