Skip to content

Commit

Permalink
Wave Completed
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonePY committed Apr 1, 2023
1 parent 6eae55e commit 7def3aa
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 0 deletions.
3 changes: 3 additions & 0 deletions FifteenthWave/anyall.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Enter your code here. Read input from STDIN. Print output to STDOUT
N, n = int(input()), input().split()
print(all([int(i) > 0 for i in n]) and any([j == j[::-1] for j in n]))
22 changes: 22 additions & 0 deletions FifteenthWave/athSort.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/python3


if __name__ == '__main__':
nm = input().split()

n = int(nm[0])

m = int(nm[1])

arr = []

for _ in range(n):
arr.append(list(map(int, input().rstrip().split())))

k = int(input())

P = sorted(arr, key=lambda row: row[k])
for i in range(len(P)):
for j in range(len(P[i])):
print(P[i][j], end=' ')
print()
3 changes: 3 additions & 0 deletions FifteenthWave/eval.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Enter your code here. Read input from STDIN. Print output to STDOUT
var = input()
eval(var)
13 changes: 13 additions & 0 deletions FifteenthWave/ginorts.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Enter your code here. Read input from STDIN. Print output to STDOUT
def f(c):
code = 0
if c.isupper():
code = 10 ** 3
elif c.isdigit():
code = 10 ** 6
if ord(c) % 2 == 0:
code = 10 ** 9
return code + ord(c)


print(*sorted(input(), key=lambda c: f(c)), sep='')
4 changes: 4 additions & 0 deletions FifteenthWave/input.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Enter your code here. Read input from STDIN. Print output to STDOUT
ui = input().split()
x = int(ui[0])
print(eval(input()) == int(ui[1]))

0 comments on commit 7def3aa

Please sign in to comment.