Mosaic Decoration I
Python Solution
from math import ceil
n, cb, cp = map(int, input().split())
bt, pt = 0, 0
for i in range(n):
b, p = map(int, input().split())
bt += b
pt += p
result = cb * ceil(bt/10) + cp * ceil(pt/10)
print(result)
Stick
Python Solution
n, k, l = map(int, input().split())
w = l*2
a = w**2
if k >= w:
print(a*n)
else:
b = a - (w-k)**2
print(a + (n-1) * b)
Restaurant Cipher
Python Solution
n = int(input())
for i in range(n):
f = {j: 0 for j in "ABCDEFG"}
line = input()
for j in line.upper():
if j in f:
f[j] += 1
print(max(f.items(), key=lambda x: x[1])[0])
Laser Defense
Python Solution
l, n, m = map(int, input().split())
off = {'L': 0, 'U': l, 'R': l*2}
arr = []
for i in range(n):
s, p = input().split()
arr.append((off[s] + int(p), 'A'))
for i in range(m):
s, p = input().split()
arr.append((off[s] + int(p), 'B'))
arr.sort()
result = 1
prev_b = 0
for i, t in arr:
if t == 'B':
result += 1
prev_b += 1
else:
result += prev_b + 1
print(result)







