diff --git a/FifteenthWave/anyall.py b/FifteenthWave/anyall.py new file mode 100644 index 0000000..fcbd2a3 --- /dev/null +++ b/FifteenthWave/anyall.py @@ -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])) diff --git a/FifteenthWave/athSort.py b/FifteenthWave/athSort.py new file mode 100644 index 0000000..18a4c52 --- /dev/null +++ b/FifteenthWave/athSort.py @@ -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() diff --git a/FifteenthWave/eval.py b/FifteenthWave/eval.py new file mode 100644 index 0000000..45fe3a8 --- /dev/null +++ b/FifteenthWave/eval.py @@ -0,0 +1,3 @@ +# Enter your code here. Read input from STDIN. Print output to STDOUT +var = input() +eval(var) diff --git a/FifteenthWave/ginorts.py b/FifteenthWave/ginorts.py new file mode 100644 index 0000000..e97b834 --- /dev/null +++ b/FifteenthWave/ginorts.py @@ -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='') diff --git a/FifteenthWave/input.py b/FifteenthWave/input.py new file mode 100644 index 0000000..9dfb3af --- /dev/null +++ b/FifteenthWave/input.py @@ -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]))