There is an apple tree in the Tautau's yard, and 10 apples will be produced in every fall tree. When Apple matures, Tata will run to pick apples. Tata had a 30-centimetre-high bench, and when she couldn't pick it up with her hand, she would step on the bench and try again.
Now it is known that 10 apples to the height of the ground (100 to 200 (including 100 and 200) of the integer (in centimeters)), and the Tata handle to reach the maximum height (100 to 120 (including 100 and 120) of the integer (in centimeters)), Please help Tata calculate the number of apples she can pick. If she touches an apple, the Apple will fall.
Input format:
Two rows of data. The first act of 10 apples to the height of the ground. The second act Tata the maximum height that can be reached when the hand is stretched straight.
output Format:
Row, this line contains only an integer that represents the number of apples that Tata can pick up.
Analysis:
A traversal comparison, can pick up on the addition of one.
1#include <cstdio>2 3 using namespacestd;4 5 intdata[Ten];6 intN,ans;7 8 intMain ()9 {Ten for(intI=0;i<Ten; i++) Onescanf"%d",&data[i]); Ascanf"%d",&n); -n+= -; - for(intI=0;i<Ten; i++) the if(data[i]<=n) ans++; -printf"%d", ans); - return 0; -}
NOIP2005 Universal group Tata Apple Picking