PYTON ÖRNEK ÇÖZÜMÜü

import functools

f = lambda xs: print(list(map(lambda n_ci: (n_ci[0], n_ci[1][1]), filter(lambda nc: nc[1][0] == 1, functools.reduce(lambda m, n_o: m | {n_o[1]: (m.get(n_o[1], (0, None))[0] + 1, n_o[0])}, enumerate(map(lambda be: be[0]**be[1], xs)), {}).items()))))

f([(25, 0), (81, 2), (25, 2), (5, 4), (36, 10), (1, 10), (10, 1), (3, 8), (6, 20)])
# [(10, 6)]

f([(12, 2), (25, 0), (81, 2), (25, 2), (5, 4), (36, 10), (1, 10), (10, 1), (3, 8), (42, 1), (6, 20), (100, .5)])
# [(144, 0), (42, 9)]
5 Beğeni
def f(x):
    return list(map(lambda m: (m[2][0] ** m[2][1], m[1]), filter(lambda k: k[0], map(lambda j: [l.count(j) == 1, l.index(j), x[l.index(j)]], (l := [i[0] ** i[1] for i in x])))))


print(f([(25, 0), (81, 2), (25, 2), (5, 4), (36, 10), (1, 10), (10, 1), (3, 8), (6, 20)]))
# [(10, 6)]

print(f([(12, 2), (25, 0), (81, 2), (25, 2), (5, 4), (36, 10), (1, 10), (10, 1), (3, 8), (42, 1), (6, 20), (100, .5)]))
# [(144, 0), (42, 9)]
4 Beğeni