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 1226. esreveR redrO

AC vs WA!
Posted by Evil Cheater 15 Dec 2002 08:41
Why when I used "ch in ['A'..'Z'] or ['a'..'z']" I got WA while when
I used "ch in ['A'..'Z','a'..'z']" I got AC? Both worked well on my
computer.

Also, why are programms bigger now?

  Thanks for any help!
Re: AC vs WA!
Posted by wyyyl 10 Aug 2006 16:35
In Free Pascal your'll get error:
Error: Got "SET OF CHAR" expected "BOOLEAN"
(by the way:"SET OF CHAR" is the "['a'..'z']")
You should write "(ch in ['A'..'Z']) or (ch in ['a'..'z'])"

'Cause the Ural uses the FPC(Free Pascal Compliation)
Re: AC vs WA!
Posted by Alexander Prudaev 8 Oct 2006 15:38
"ch in ['A'..'Z','a'..'z']" = "(ch in ['A'..'Z'])or(ch in ['a'..'z'])"
It's also possible
Also you can do in such way:

...
if upcase(ch) in ['A'..'Z'] then
...