Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ilosc_kwadratow = int(input())
- #kwadraty = []
- kwadraty = input().split()
- a = 0
- while (a < ilosc_kwadratow):
- kwadraty[a] = int(kwadraty[a])
- a+=1
- maksymalne_skoki = 0
- #kwadraty.append(0)
- b = 0
- while (b < ilosc_kwadratow-1):
- skoki = 0
- miejsce = kwadraty[b]
- c = b
- while (c < ilosc_kwadratow-1):
- if (kwadraty[c+1] <= miejsce):
- skoki+=1
- miejsce = kwadraty[c+1]
- if(skoki > maksymalne_skoki):
- maksymalne_skoki = skoki
- else:
- skoki=0
- miejsce = kwadraty[c+1]
- c+=1
- b+=1
- print(maksymalne_skoki)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement