than height (registration questions)

Source: Internet
Author: User

The annual college students Physical Fitness assessment began again, Xiao Chen seniors at this time can not help but some proud, thought and could be the scenery of a (Xiao Chen seniors usually pay attention to exercise, so physical fitness is better, learn younger sister also should exercise more body oh ^ ^), the first test project is of course height, At this time, Xiao Chen suddenly want to know how many classmates in the class than he high, learn younger sister, you can help Xiao Chen seniors?? Input first enter an integer t, below the T set of data for each set of data first input integer an n and an integer x,n the class has n people, X for the height of Xiao Chen Seniors (1<=n<=100, 150<=x<=200) The following line has n integers, Indicates the height of the other person Y (150<=y<=200) output output is higher than the number of young seniors 13 178162 180 1711 The analysis of the amount, it seems that there is no analysis of the--Direct AC Bar #include<stdio.h>

intMain ()
{
intT

//freopen ("1.in", "R", stdin);
//freopen ("1.out", "w", stdout);
scanf"%d", &t);

while(t--)
{
intI, n, x, Y, sum=0;

scanf"%d%d", &n, &x);

for(i=0; i<n; i++)
{
scanf"%d", &y);

if(x > Y)
sum++;
}

printf"%d\n", sum);
}

return0; 

}

than height (registration questions)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.