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 1001. Reverse Root

Python 3.6 What's wrong with the code? Что не так с кодом?
Posted by 2tlin 4 May 2018 00:57
L = []
string = input()

while string:
    [L.append(int(num)**0.5) for num in string.rstrip().split(' ') if num != '']
    string = input()

for i in L[::-1]:
    print('%.4f'%i)

Edited by author 06.05.2018 03:54

Edited by author 06.05.2018 03:54

Edited by author 06.05.2018 03:54

Edited by author 06.05.2018 03:54
Re: Python 3.6 What's wrong with the code? Что не так с кодом?
Posted by Quietude 6 Oct 2018 21:56
Поздно, наверное, но он же у тебя не считывает пустую строку. Из 4-х чисел теста номер 1, он обработал только первые два.