ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1823. Ideal Gas

n = 0 ?
Posted by RR 19 Mar 2011 14:50
When n = 0,
if we have to calculate T, is the answer 'undefined' ?
if we have to calculate V, is the answer 'error' or 'undefined'?
Re: n = 0 ?
Posted by RR 19 Mar 2011 15:02
Accepted. Formula should be understood like math :)

Edited by author 19.03.2011 19:58

Edited by author 19.03.2011 19:58
Re: n = 0 ?
Posted by George_Aloyan[PTSObninsk] 29 Mar 2011 15:13
I don't understend what to do in this case.
If we have any of t,v,n,p given to us <= 0 then we should write 'error'? Or I haven't understood the problem right?
Re: n = 0 ?
Posted by George_Aloyan[PTSObninsk] 9 Apr 2011 17:36
I just haven't read properly. If we have input p = 0 and n = 0 then we should output 'undefined'.
If (p = 0 and n <> 0) or (p <> 0 and n = 0) then we should output 'error'.
When we calculate n and p CAN be 0. We just must output '0'.
When we calculate T and V CAN'T be 0. We just must output 'error'.

I hope it'll help and you will not be sitting for hours as I did.

Sorry for my English, but I think it is possible to understand what I meant even with my mistakes.
to George_Aloyan[PTSObninsk]
Posted by Dimonka 22 Mar 2012 15:35
so i rebuilt my programm like that, but still  wa6!
http://acm.timus.ru/forum/thread.aspx?id=27987&upd=634675078581077076
someone please help me@!