Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- a=int(input())
- N=[int(i) for i in input().split()]
- N1=sorted(N)
- if N==N1:
- print(0)
- while N!=N1:
- for i in range(len(N)):
- if i+2>len(N):
- break
- else:
- if N[i]>N[i+1]:
- N[i], N[i+1]=N[i+1], N[i]
- print(*N)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement