diff --git a/week-01/lilmert/README.md b/week-01/lilmert/README.md new file mode 100644 index 0000000..e69de29 diff --git a/week-01/lilmert/aboveaverage.py b/week-01/lilmert/aboveaverage.py new file mode 100644 index 0000000..2f4e745 --- /dev/null +++ b/week-01/lilmert/aboveaverage.py @@ -0,0 +1,32 @@ +import sys + +cases = int(sys.stdin.readline()) + +def reader(): + cond = sys.stdin.read(1) + temp = [] + while cond.isalnum(): + temp.append(cond) + cond = sys.stdin.read(1) + + return int(''.join(temp)) + +class Classroom: + def __init__(self, num_ppl, avg=None): + self.num_ppl = int(num_ppl) + self.avg = avg + self.grades = [] + +for i in range(cases): + temp_class = Classroom(reader()) + for j in range(temp_class.num_ppl): + temp_class.grades.append(reader()) + + temp_avg = sum(temp_class.grades)/len(temp_class.grades) + count = 0 + for grade in temp_class.grades: + if grade > temp_avg: + count += 1 + + output = count/len(temp_class.grades) * 100 + print("{:.3f}%".format(output)) \ No newline at end of file diff --git a/week-01/lilmert/amsterdamdistance.py b/week-01/lilmert/amsterdamdistance.py new file mode 100644 index 0000000..44bd5c7 --- /dev/null +++ b/week-01/lilmert/amsterdamdistance.py @@ -0,0 +1,2 @@ +import sys + diff --git a/week-01/lilmert/autori.py b/week-01/lilmert/autori.py new file mode 100644 index 0000000..448e993 --- /dev/null +++ b/week-01/lilmert/autori.py @@ -0,0 +1,6 @@ +import sys + +for char in sys.stdin.readline(): + if char.isupper(): + print(char, end="") +print() \ No newline at end of file diff --git a/week-01/lilmert/towering.py b/week-01/lilmert/towering.py new file mode 100644 index 0000000..ff6eb3d --- /dev/null +++ b/week-01/lilmert/towering.py @@ -0,0 +1,33 @@ +import sys + +line = sys.stdin.readline() + +count = 0 +heights = [] +boxes = [] +for num in line.split(" "): + if count < 6: + boxes.append(int(num)) + else: + heights.append(int(num)) + count += 1 + +boxes.sort(reverse=True) + +def find_tower(box_list, total_height): + for i in range(4): + temp = len(box_list[i+1:]) + for j in range(temp-1): + box1 = box_list[i] + box2 = box_list[i+j+1] + others = box_list[i+j+2:] + for box3 in others: + if box1+box2+box3==total_height: + print(box1, end=" ") + print(box2, end=" ") + print(box3, end=" ") + +find_tower(boxes, heights[0]) +find_tower(boxes, heights[1]) +print() +