s1 = input() s2 = input() wordMax ='' max = 0 s1 = s1 + ' ' while len(s1) > 0: n = s1.find(' ') word = s1[:n] if len(word) > max: max = len(word) wordMax = word s1 = s1[n+1:] print(wordMax) wordMax ='' max = 0 s2 = s2 + ' ' while len(s2) > 0: n = s2.find(' ') word = s2[:n] if len(word) > max: max = len(word) wordMax = word s2 = s2[n+1:] print(wordMax)
# процедура
# основная часть программы s1 = input() s2 = input() printMaxWord(s1) printMaxWord(s2)
1000 ms 256 Mb Правила оформления программ и список ошибок при автоматической проверке задач