Question 7.14 _ A, what is Valentine's Day 7.14?
413. xuejie's desktopTime Limit1000 MSMemory limit65536 KB question description
After joining the training team, xuejie learned how to use the ubuntu system to solve the problem. However, without the 360 computer manager, xuejie could no longer see how many people in China were abused by her fast computer boot. As a computer expert, xuejie spent a few minutes hacking into 360 of the database to get the boot time of 360 million users nationwide. Now xuejie wants to count herself as the number of people who have been defeated?
Input Format
Multiple groups of data are input. First, the number of data groups is given. T (T ≤ 10) , Below T Group data, starting N (1 ≤ n ≤ 100000) , 360 of users, and T The start time of xuejie. N Numbers, T I Represents I User's boot time. Where T , T I Non-negative integer and less 10 9 .
Output Format
One row of data in each group shows how many percent of users are defeated by xuejie, accurate to the last two digits of the decimal point.
Input example
15 31 1 2 2 3
Output example
80.00%
I did not think about water problems, but I was careless and did not think about it carefully.
#include <iostream>#include <cstdio>#include <algorithm>#include <cstring>#define N 100011using namespace std; int Time[N];int main(){ int t; float ans; scanf("%d",&t); while (t--) { memset(Time,0,sizeof(Time)); int num; int t; scanf("%d%d",&num,&t); for(int i=1;i<=num;i++) { scanf("%d",&Time[i]); } sort(Time+1,Time+1+num); int i=0; for(i=num;i>0;i--) { if(t>Time[i]) { break; } } ans=float(i)/float(num)*float(100); printf("%.2f%%\n",ans); } return 0;}
What should I do with 123 to 14 math in eighth grade?
3. There are several persons in an interest group. One greeting card is sent to each other for the New Year. It is known that a total of 132 greeting cards are sent to the group.
Solution: Set a person for the group
Based on question
A × (A-1) = 132
A'-a-132 = 0
(A-12) (a + 11) = 0
A = 12 or a =-11 (remove)
There are 12 people, each of whom receives 12-1 = 11 greeting cards
4. The cooperation between a project, A and B is completed in six days. It is known that a is performed separately for five days longer than B. How many days does it take for a and B to complete independently?
Solution: It takes x days for B to complete the task independently.
6x1/x + 6x1/(x + 5) = 1
6x + 30 + 6x = x 2 + 5x
X²-7x-30 = 0
(X-10) (x + 3) = 0
X = 10 or x =-3 (remove)
It takes 10 days for Party B to complete the task independently.
It takes 10 + 5 = 15 days to complete a separate task.
5. A rectangular Vegetable Greenhouse planned to be built in a village requires a ratio of 2 to 2 in length to width. In the warm room, 3 m wide open space is retained along the front interior wall, the other three sides of the interior wall each retain a 1 m wide channel, when the length and width of the rectangular greenhouse are much less, the area of the vegetable planting area is 288 m²?
Solution: Set the width to a meter, and the length is 2a meters.
Based on question
(2a-3-1) (a-1-1) = 288
(2a-4) (A-2) = 288
(A-2) 2 = 144
A-2 = + 12
A = 2 + 12
A = 14 or a =-10)
Therefore, when the width is 14 meters and the length is 28 meters, the area of the vegetable planting area is 288 m².
6. A cross-section of a village is planned to build a canal with the same waist and trapezoid shape. The cross-section area is 10.5m 2, and the upper and lower sides are 3 m wide and 2 m more than the depth. How wide should the upper and lower sides be dug?
Solution: Set the base to a meter, then the bottom of the A-3 meter, deep A-2 Meter
Based on question
(A + A-3) x (A-2)/2 = 10.5
(2a-3) (A-2) = 21
2a-5a-15 = 0
(2a + 3) (A-5) = 0
A = 5 or a =-2/3)
So the bottom is 5 meters
7. A store has a batch of shirts for sale. If each shirt makes a profit of 40 yuan, 20 shirts can be sold every day. To reduce inventory and increase profits as soon as possible, the mall decides to sell shirts at a lower price, if the price of each shirt is reduced by 1 yuan, two more shirts can be sold each day. Q: How much yuan can the price of each shirt be reduced by 1200 yuan per day on average?
Solution: reduce the price of RMB a, so more 2a pieces are sold.
(40-a) × (20 + 2a) = 1200
800-20a + 80a-2a 2 = 1200
A²-30a + 200 = 0
(A-10) (A-20) = 0
A = 10 or a = 20
That is to say, you can reduce the price by 10 yuan or 20 yuan.
8. The average monthly growth rate of a factory in the first quarter is x, the output value in the first quarter is a RMB, and the output value in the second quarter is 1.21a. What is the value of x?
Solution: Set the growth rate to x.
A (1 + x) ² = 1.21a
(1 + x) 2 = 1.1
1 + x = 1.1 or 1 + x =-1.1
X = 0.1 or-2.1 does not match the meaning of the question.
Growth rate = 10%
9. How many percent of the cost of a product is reduced on average every time the cost of a product is reduced by 36% due to two consecutive cost reductions?
Solution: Set the cost to a, and reduce x each time
A (36%) ² = a × (1)
(0.64) ² =
0.8 = 0.8 or =-
X = 0.2 or 1.8 (excluding the question)
20% lower
10. a store purchases a batch of goods at the price of 21 yuan per piece. This item can be priced on its own. If each item is a yuan, it can be sold (-10 a) pieces, however, the price Bureau limits the profit of each item to no more than 20%, and the store must make a profit of 400 yuan. How many items need to be purchased? How much is the price per device?
Solution: Based on the question
(A-21) (350-10a) = 400
350a-7350-10a + 210a = 400
A²-56a + 775 = 0
(A-25) (a-31) = 0
A = 25 or a = 31
Because the profit cannot exceed 20%, the maximum a value is 21 × (1 + 20%) = 25.2.
Therefore, a = 31 does not match the meaning of the question... the remaining full text>
High school mathematics: (1) a1 = 2, d =-4, S9 (2) a1 =-3, an = 3n + 2, Sn (3) S4 = 5, d =-1/2, a1 and a8 (4) S7 = 14, a1 =-4,
(1) S9 =-126
(2) Sn = n (3n-1)/2
(3) a1 = 2 a8 =-3/2
(4) d = 2 an = 2n-6
(5) a1 =-8 Sn = square-9n of n
(6) Sn = 2n square + 9n