|
|
back to boardread input in python Posted by crc 25 Jan 2015 02:56 Hi, I get runtime error with my program. I am almost sure that it is some problem with reading the input. I have tested my program with many examples and always get the right answer. This is what I use to read the input: for y,line in enumerate(stdin.read().split()): for x,char in enumerate(line.decode('utf8')): c=ord(char) ....... I had to use decode('utf8') otherwise I got some strange characters. But now the number I get from ord(char) are not the codes given in the problem. Thanks. |
|
|