3 Commity e414cc8334 ... 4cb95ad100

Autor SHA1 Wiadomość Data
  “stak” 4cb95ad100 Merge branch 'master' of https://notabug.org/stak/innopolis 2 lat temu
  “stak” edb45d7c4c some new tasks added 2 lat temu
  “stak” ac19c2dc2a new tasks added 2 lat temu

+ 1 - 0
tasks/sorting/sort_G.py

@@ -13,3 +13,4 @@ for i in range(n):
             print("no")
     if flag:
         print("yes")
+ .

+ 4 - 0
tasks/sorting/sort_H.py

@@ -0,0 +1,4 @@
+n = int(input())
+results = [list(map(int, input().split())) for i in range(n)]
+
+print(results)

+ 8 - 0
tasks/sorting/sort_J.py

@@ -0,0 +1,8 @@
+n, nums, count = int(input()), list(map(int, input().split())), 0
+
+for i, num in enumerate(nums):
+    for j, char in enumerate(nums):
+        if i < j and num > char:
+            count += 1
+
+print(count)

+ 11 - 0
tasks/sorting/sort_K.py

@@ -0,0 +1,11 @@
+from sort_A import simply_sort
+
+n, k = map(int, input().split())
+commands = list(map(int, input().split()))
+before = sum(commands)
+simply_sort(commands)
+
+for i in range(k):
+    commands[i] = int(str(commands[i]).replace("-", ""))
+
+print(sum(commands))