|
|
вернуться в форумPython 3 WA 5th test i don't understand why. maybe somebody could help... here's the code from math import sqrt n=int(input()) l=0 a=[None]*n b=[None]*n for k in range(n): a[k]=int(input()) for z in range(n): p=0 for i in range(n): if a[i]>p: p=a[i] l=i b[z]=n-1-l a[l]=-a[l] for z in range(n): a[z]=-a[z] while n>1: n=n-1 a[b.index(n-1)]=2*sqrt(a[b.index(n)]*a[b.index(n-1)]) print('{:.2f}'.format(a[b[0]])) Edited by author 27.10.2020 23:40 |
|
|