#P2433. Multi-Part Arithmetic and Logic Problems

    ID: 15704 Type: Default 1000ms 256MiB

Multi-Part Arithmetic and Logic Problems

Multi-Part Arithmetic and Logic Problems

This problem consists of 14 sub-problems. Each sub-problem asks you to perform simple arithmetic calculations or logical reasoning, and to output the answer in the specified format. Some formulas are given in LaTeX format. You are not required to read any input; simply output the answers exactly as specified below.

Sub-problem details:

  1. Print the string: I love Luogu!
  2. There are \(10\) apples. Little A takes \(2\) apples, Uim takes \(4\) apples, and Little B takes the remaining apples. You need to output two numbers separated by a space:
    1. Total apples taken by Little A and Uim
    2. Apples taken by Little B
  3. There are \(14\) apples to be equally distributed among \(4\) students. The leftover apples that cannot be equally distributed are kept in the fridge. Output three numbers on separate lines:
    1. Number of apples each student gets
    2. Total apples distributed
    3. Leftover apples
  4. There are \(500\) mL of soda to be divided equally among \(3\) students. Output one number representing the amount each student gets. The answer must have 6 significant digits and must not use scientific notation.
  5. Two trains are approaching each other. Train \(A\) has a length of \(260\) m and travels at \(12\) m/s, while train \(B\) has a length of \(220\) m and travels at \(20\) m/s. They start timing from the moment their fronts meet. Output the number of seconds after which their tails are no longer in contact. The answer is an integer.
  6. A rectangle has a length of \(6\) cm and a width of \(9\) cm. Output the length of its diagonal (in cm) using direct output (for example, using cout in C++). Use the formula \(d=\sqrt{6^2+9^2}\).
  7. Uim's bank account starts with \(100\) yuan. The following operations occur sequentially:
    1. Deposit \(10\) yuan.
    2. Spend \(20\) yuan on shopping.
    3. Withdraw all the money.
    Output the balance after each operation on separate lines.
  8. For a circle (and a sphere) with radius \(r=5\), using \(\pi=3.141593\), output three numbers on separate lines:
    1. Circumference of the circle
    2. Area of the circle
    3. Volume of the sphere
  9. A monkey buys some peaches. For three consecutive days, he performs the following operations:
    1. On the first day, he eats half of the peaches plus one extra.
    2. On the second day, he eats half of the remaining peaches plus one extra.
    3. On the third day, he eats half of the remaining peaches plus one extra.
    On the fourth morning, only one peach remains. Determine the initial number of peaches.
  10. Luogu's judging tasks increase uniformly over time. It is known that:
    1. 8 machines take 30 minutes to finish all the tasks exactly.
    2. 10 machines take 6 minutes to finish all the tasks exactly.
    Determine how many machines are needed to finish the tasks in exactly 10 minutes.
  11. Little A runs at \(5\) m/s and Little B runs at \(8\) m/s. Little B starts 100 m behind Little A. Both start at the same time. Output the time required (in seconds) for Little B to catch up to Little A. Use direct output (for example, cout in C++).
  12. There are 26 letters in the alphabet. Determine:
    1. The position of the letter M in the alphabet.
    2. The letter that is at position 18 in the alphabet.
    Output the results on two separate lines (first the number, then the letter).
  13. Little A has two balls of spherical clay with radii \(4\) and \(10\), respectively. After merging them, he forms a cube. The edge length of the cube is determined by the total volume of the two spheres. Compute the cube's edge length and if the result is not an integer, discard the fractional part. Use \(\pi=3.141593\).
  14. According to predictions, when the course price is \(110\) yuan, \(10\) students enroll. For every 1 yuan decrease in price, one more student enrolls (and vice versa). If the total tuition revenue is to be \(3500\) yuan, determine the course price. If two answers are possible, choose the smaller one. If the answer is not an integer, round it to the nearest integer.

    inputFormat

    No input is provided.

    outputFormat

    Output the answers for the 14 sub-problems in the order specified. The output format for each sub-problem must exactly match the requirements described above:

    1. Output a string.
    2. Output two numbers on one line separated by a space.
    3. Output three numbers, each on a new line.
    4. Output one floating-point number with 6 significant digits (not in scientific notation).
    5. Output an integer.
    6. Output the diagonal (floating-point) of the rectangle.
    7. Output three numbers (bank balances) on separate lines.
    8. Output three numbers on separate lines.
    9. Output an integer.
    10. Output an integer.
    11. Output a floating-point number (time in seconds).
    12. Output a number and a letter on separate lines.
    13. Output an integer (cube edge length).
    14. Output an integer (course price).

    Note: Use the exact number of decimal places as specified.

    sample

    I love Luogu!
    

    6 4 3 12 2 166.666667 15 10.816654 110 90 0 31.41593 78.539825 523.59875 22 9 33.333333 13 R 16 50

    </p>