URAL 1823. Ideal Gas(数学啊 )

Many of you know the universal method of solving simple physics problems: you have to find in a textbook an identity in which you know the values of all the quantities except for one, substitute the numbers into this identity, and calculate the unknown quantity.

This problem is even easier. You know right away that the identity needed for its solution is the Clapeyron–Mendeleev equation for the state of an ideal gas. This equation relates the pressure of an ideal gasp, the amount of substancen, the volume occupied by the gasV, and the temperatureT. Given three of these quantities, you have to find the fourth quantity. Note that the temperature of a gas and the volume occupied by it must always be positive.

Input

Each of the three input lines has the form “X = value”, whereXis the symbol for a physical quantity andvalueis a nonnegative integer not exceeding 1000. The three lines specify the values of three different quantities. Pressure is specified in pascals, amount of substance in moles, volume in cubic meters, and temperature in kelvins. It is guaranteed that the temperature and volume are positive. The universal gas constantRshould be taken equal to 8.314 J / (mol · K).

Output

If the input data are inconsistent, output the only line “error”. If the value ofXcan be determined uniquely, output it in the format “X = value” with an accuracy of 103. If it is impossible to uniquely determine the value ofX, output the only line “undefined”.

Sample

inputoutput

p = 1n = 1V = 1T = 0.120279

Notes

Recall that Pa = N / m2and J = N · m.

,在旅途中,我遇见了你,你我相识是缘分!

URAL 1823. Ideal Gas(数学啊 )

相关文章:

你感兴趣的文章:

标签云: