Decipher this!
Защо на задача Decipher this! (от Python Fundamentals) ми дава 60/100 в Judge ?
Eто кода: https://pastebin.com/cXSFdBG5
Защо на задача Decipher this! (от Python Fundamentals) ми дава 60/100 в Judge ?
Eто кода: https://pastebin.com/cXSFdBG5
Ти го правиш все едно винаги входът ти е текст състоящ се от три думи- ами ако е повече?
Eто редактиран кода ти- само съм добавил един лист res, където запазваш резултата дума след дума, за да не ти променям много кода :)
text = input().split()
def swap(c, i, j):
c = list(c)
x=c[i]
c[i], c[j] = c[j], x
return "".join(c)
res=[]
for key in text:
list_zero = []
list_element = []
[list_zero.append(i) for i in key if i.isdigit()]
num = int("".join(list_zero))
num = chr(num)
list_element.insert(0,num)
[list_element.append(j) for j in key if not j.isdigit()]
res.append(swap(list_element, 1, - 1))
res.append(" ")
list_zero.clear();
list_element.clear();
res="".join(res)
print(res)
Mersi mnogo !
great, i couldn't solve it but got everyone's suggestion, i'll try again pizza tower
This is the best solution: snaptik
Kudos to the prostadine author for their transparency and honesty in sharing personal experiences.
Ragdoll Archers lets players take control of a stick figure armed with an endless supply of arrows and bows. ragdoll archers