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 1006. Square Frames

To admins (and python coders)
Posted by yyll 23 Jun 2021 20:33
I don't know why, but in Python, code points of frame characters are:
upper_left  = 1066
upper_right = 1111
lower_left  = 1040
lower_right = 1065
horizontal  = 1044
vertical    = 1110
That's really strange, because there are no common codecs encode those characters as such.
Could Admin fix this or at lease give some explanations please?

Also, don't put non-ascii characters in your source code, but use:
  c == chr(1066)
or
  ord(c) == 1066
Re: To admins (and python coders)
Posted by yyll 23 Jun 2021 20:48
ord('┌') == 9484
list('┌'.encode('cp437')) == [218]
list('┌'.encode('utf_16_le')) == [12, 37] # 12+37*256 == 9484

and Unicode code point is: U+250C == 9484