← Back to List

9550번: 아이들은 사탕을 좋아해 ↗

Solutions

C++14
206 B | 206 chars
#include <iostream>
using namespace std;
int T;
int N,K,a,S;
int main()
{
	cin>>T;
	for(int w=0; w<T; w++)
	{
		S=0;
		cin>>N>>K;
		for(int x=0; x<N; x++)
		{
			cin>>a;
			S+=a/K;
		}
		cout<<S<<endl;
	}
}