EDN Admin
Well-known member
Hello can anyone help me do this task
1 Physics<br/>
<br/>
We all know (physics, is not it?) That the power P is calculated as the product of voltage and amperage in Unit I.<br/>
to force the W watt, ampere, A for amps and volts for voltage V. Prefixes units for this task<br/>
as m (milli) and k (kilo). It is also 1000mX = 1X = 1kX and 1000X, for a unit of X.<br/>
<br/>
Suljo is the task of physics got a bunch of tasks. Each of them is a form of text, and the only thing<br/>
We know that the words appear in exactly two different sizes of the form x = dY (X size, d decimal<br/>
greater than 0 and y units, no spaces). Since Suljo tired, I asked you to create a program that<br/>
will do homework for him.<br/>
<br/>
Entry and Exit<br/>
<br/>
Input data are read from the file "fizika.in.<br/>
<br/>
The first line contains an integer N (1 <= N <100), the number of tasks. The next N lines contain N<br/>
tasks. Each task consists of a maximum of 300 ASCII characters print (meaning, numbers, letters, and<br/>
Various punctuation). = Sign will only appear in the case of an assignment task conditions<br/>
(Mean, something like `sd` 20 = not allowed).<br/>
<br/>
The result will be to print to file "fizika.out.<br/>
<br/>
For each print job requested value in the form X = dY, where Y is always units without prefixes (mean<br/>
only W, V or A, not mW and the like). d is always rounded to two decimal places.<br/>
<br/>
Test Examples<br/>
<br/>
fizika.in<br/>
<br/>
4<br/>
If the voltage U = 200V and the current strength I = 2A, what will be a spent force?<br/>
The steering power is P = 7 kW amperage I = 3.57M. Voltage is ...?<br/>
Computer consumes P = 400W and the voltage in an urban networkis U = 220V. What is the amperage?<br/>
abcdP = = 1WefgU 1Vkdf<br/>
<br/>
BHOI online competition in Informatics Task Physics<br/>
<br/>
fizika.out<br/>
<br/>
P = 400.00W<br/>
U = 1960784.31V<br/>
I = 1.82A<br/>
I = 1.00A<br/>
<br/>
Limitations<br/>
<br/>
Your program can run longer than 1 second and should not use more than 32 MiB of memory.
Thanks in advance
View the full article
1 Physics<br/>
<br/>
We all know (physics, is not it?) That the power P is calculated as the product of voltage and amperage in Unit I.<br/>
to force the W watt, ampere, A for amps and volts for voltage V. Prefixes units for this task<br/>
as m (milli) and k (kilo). It is also 1000mX = 1X = 1kX and 1000X, for a unit of X.<br/>
<br/>
Suljo is the task of physics got a bunch of tasks. Each of them is a form of text, and the only thing<br/>
We know that the words appear in exactly two different sizes of the form x = dY (X size, d decimal<br/>
greater than 0 and y units, no spaces). Since Suljo tired, I asked you to create a program that<br/>
will do homework for him.<br/>
<br/>
Entry and Exit<br/>
<br/>
Input data are read from the file "fizika.in.<br/>
<br/>
The first line contains an integer N (1 <= N <100), the number of tasks. The next N lines contain N<br/>
tasks. Each task consists of a maximum of 300 ASCII characters print (meaning, numbers, letters, and<br/>
Various punctuation). = Sign will only appear in the case of an assignment task conditions<br/>
(Mean, something like `sd` 20 = not allowed).<br/>
<br/>
The result will be to print to file "fizika.out.<br/>
<br/>
For each print job requested value in the form X = dY, where Y is always units without prefixes (mean<br/>
only W, V or A, not mW and the like). d is always rounded to two decimal places.<br/>
<br/>
Test Examples<br/>
<br/>
fizika.in<br/>
<br/>
4<br/>
If the voltage U = 200V and the current strength I = 2A, what will be a spent force?<br/>
The steering power is P = 7 kW amperage I = 3.57M. Voltage is ...?<br/>
Computer consumes P = 400W and the voltage in an urban networkis U = 220V. What is the amperage?<br/>
abcdP = = 1WefgU 1Vkdf<br/>
<br/>
BHOI online competition in Informatics Task Physics<br/>
<br/>
fizika.out<br/>
<br/>
P = 400.00W<br/>
U = 1960784.31V<br/>
I = 1.82A<br/>
I = 1.00A<br/>
<br/>
Limitations<br/>
<br/>
Your program can run longer than 1 second and should not use more than 32 MiB of memory.
Thanks in advance
View the full article