4. (physics) Two bodies with masses $m$ and $2 m$ are connected by ropes. One rope is thrown over a pulley, the axis of which is attached to the ceiling. Another rope has the same pulley placed on it, to the axis of which a body with mass $4 m$ is attached (see figure). Find the tension force in the rope connecting the bodies $m$ and $2 m$ through the upper pulley. The ropes are inextensible and weightless. The pulleys are weightless and can

![](https://cdn.mathpix.com/cropped/2024_05_06_7d3a82aa7ed091c0d22dg-4.jpg?height=332&width=206&top_left_y=448&top_left_x=1690)
rotate without friction.
Solution. Since the blocks do not move (only rotate), the acceleration of the body with mass $4 m$ is zero. Therefore, the tension force in the lower rope connecting the bodies $m$ and $2 m$ is

$$
T_{u}=2 \mathrm{mg}
$$

Newton's second law for the bodies with masses $m$ and $2 m$ in projections on the axis directed vertically downward has the form

$$
\begin{aligned}
& 2 m g+T_{n}-T_{\sigma}=2 m a \\
& m g+T_{n}-T_{\sigma}=-m a
\end{aligned}
$$

where $T_{\varepsilon}$ is the tension force in the rope connecting the bodies $m$ and $2 m$ and passing over the upper block. In (*) it is taken into account that the accelerations of the bodies $m$ and $2 m$ are equal in magnitude and oppositely directed. Subtracting these equations, we find $a=g / 3$. From this,

$$
T_{\varepsilon}=\frac{10}{3} m g
$$

5.. (informatics) A single natural number N, not exceeding 1000, is input to the program. The task is to calculate the number of different factorizations of this number into 3 factors, not equal to 1 or N. Two factorizations are considered the same if all factors in them are the same up to the order. All factors in the factorization must be positive. For example, the number 8 has a unique factorization that meets the condition of the problem: $8=2 \cdot 2 \cdot 2$. The number 16 has a unique factorization: $16=2 \cdot 2 \cdot 4$. The number 36 has 3 factorizations: $36=2 \cdot 2 \cdot 9, 36=2 \cdot 3 \cdot 6, 36=3 \cdot 3 \cdot 4$.

The only line of input data contains an integer N within the range from 1 to 1000 inclusive: $1 \leq N \leq 1000$. The answer should be a single number - the number of factorizations of the number $N$ into 3 factors that meet the condition of the problem.

Examples of input data and program results:

| Example input data | Example result |
| :--- | :--- |
| 1 | 0 |
| 4 | 0 |
| 8 | 1 |
| 16 | 1 |
| 24 | 2 |
| 36 | 3 |
| 42 | 1 |

## Comments on the informatics problem:

The solution to the problem is a program code written in any traditional programming language, with the language specified. In the case of the impossibility of writing code in a traditional programming language, a correct program algorithm, presented in the form of a flowchart or pseudocode, can be accepted as a partial solution.

The program should read input data from the standard input stream (as if these data are entered from the keyboard) and output results to the standard output stream (as if these data are printed on the screen). The program should work correctly with the input data described in the problem conditions. The correctness of the input data is guaranteed, and it is not necessary to check it additionally within the program (if the problem states that an integer from 0 to 1000 is input, there is no need to additionally check whether, for example, a text string or a number outside this range is entered).

The program should output only the answer required by the problem (which may be accompanied by a brief textual formatting or without it). Any other output of results during the program's operation will be considered an error. For a better understanding of the problem conditions and the formats of input and output data, the problem is accompanied by several examples of correct input data and the correct result of the program's operation, provided in the section “examples of input data and program results”.

The written program should work efficiently, that is, compute the correct answer, preferably in the shortest possible time. Programs that are written significantly inefficiently, that is, taking significantly more time than efficient solutions, will be considered an incomplete solution.

The program code should be written legibly, neatly, with indents and a reasonable amount of comments in the program code. A few insignificant syntax errors in the code are allowed, provided that they do not affect the overall readability and understanding of the code. An untidy (unreadable) program code and/or a large number of syntax errors may result in a reduced overall score for the problem.

## Example of solution formatting (program code):

```
{pascal} //indication of the language in which the program is written
program MyProg;
var:
begin
    {read input data} //comments in the body of the program
readln(a,b);
    ..=$ j then \{check that the third factor is greater than or equal to the second\}

inc(c); \{then the factorization meets the problem's condition and will be counted only once\} $\{$ writeln(i,'

writeln(c); \{output the answer\}

end
```