from itertools import permutations, product
def acronyms(x):
res = {x}
for digs in permutations(str(x)):
if digs[0] != '0': # число, если не ноль, не начинается с нуля
res.add(int(''.join(digs)))
return res
a, b, c = 54, 12, 75
zz = acronyms(c)
for x, y in product(acronyms(a), acronyms(b)):
if x + y in zz:
print("%d + %d = %d" % (x, y, x + y))
xy = ({""}, {""})
for _ in range(int(input())):
for i, t in enumerate(input().split()):
xy[i].add(t)
print(max(map(len, xy)) // 2)
class Rextester {
public static String text;
public static void main(String[] args) {
text = "JavaRush. Learn once — use anywhere";
run();
}
public static void run() {
for (int i = 0; i < 10; i++) {
System.out.println(text);
}
}
}
import re
print(re.sub(r'(\b|\d)(\d+?)(?=(?:\d\d\d)+?\b)', r'\1\2.', "1234567890"))
go get
. Корневой каталог своего проекта может быть любым, в том числе вне GOPATH. x.value = 2 + 2
(+ 2 2)
x = 2 + 2
resolve((recoupment > 0 && probability <= 50 && setWinnerDrop(itemsbot, true))
|| setWinnerDrop(itemsbot, false) || false);
a, b, n = 2, 3, 4 # 2сек/лист, 3сек/лист, 4 листа
ab = a + b
print(min(a * (n - n * a // ab), b * (n - n * b // ab)))