Cod sursa(job #2733002)
| Utilizator | Data | 29 martie 2021 18:21:34 | |
|---|---|---|---|
| Problema | Sortare prin comparare | Scor | 0 |
| Compilator | py | Status | done |
| Runda | Arhiva educationala | Marime | 0.41 kb |
def sorteaza(arr):
return arr.sort()
def main():
#step 1: open files
fin = open("algsort.in","r")
fout = open("algort.out","w")
#step 2:
# read the number of elements
n = int(fin.readline().strip())
# check the type of the variabile n
#print(type(n))
arr = fin.readline().strip().split(" ")
#print(type(arr))
arr = [int(i) for i in arr]
sorteaza(arr)
for i in arr:
fout.write(str(i) + " ")
main() 