[Tao...] Taotao picked apple

Source: Internet
Author: User

[Description]

There is an apple tree in the yard of taotao's house. Every fall, the tree will produce 10 apples. When Apple matures, Tao will go to pick up the apple. Tao has a bench with a height of 30 cm. When she cannot pick the apple directly with her hand, she will step on the bench and try again.
Now we know the height of 10 apples to the ground, and the maximum height that can be reached when Tao's handles are stretched. Please help Tao calculate the number of apples She can pick. If she encounters an apple, the apple will fall.

[Input format]

The input includes two rows of data. The first line contains 10 integers (in centimeters) between 100 and 200 (including 100 and 200), respectively indicating the height from 10 apples to the ground, two Adjacent integers are separated by a space. The second row only contains an integer (in centimeters) between 100 and 120 (including 100 and 120), which indicates the maximum height that can be reached when the tao handles straighten.

[Output format]

The output contains a row. This row contains only one integer, indicating the number of apples that Tao can extract.

[Example input]

100 200 150 140 129 134 167 198 200 111
110
[Sample output]

5

[Analysis]

No good analysis.

 
# Include <stdio. h> # define maxn 10int A [maxn]; int H, ans; int main () {for (INT I = 0; I <maxn; ++ I) scanf ("% d", & A [I]); scanf ("% d", & H); H + = 30; For (INT I = 0; I <maxn; ++ I) if (h> = A [I]) ++ ans; printf ("% d \ n", ANS); Return 0 ;}

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.