|
|
вернуться в форумWrong Answer (Python 3.3) Послано Nerlin 30 мар 2013 23:09 I really don't understand why my solution is wrong but here it is: letters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" start = 0 s = input() for i in range(0, len(s)): if not(s[i] in letters): word = s[start:i] other = s[i:i+1] if (word != ""): print(word[::-1], end="")
print(other, end="") start = i+1 if (start != len(s)): print(s[start:len(s)][::-1], end="") What's wrong with this solution? WA (Test 2) Edited by author 30.03.2013 23:10 Re: Wrong Answer (Python 3.3) I think that the input can be more than one line. |
|
|