Орлов Борис, 527 группа MulSum 1320
Торбин Николай, 516 группа MulSum 1534
f1from typing import Any, Protocol, TypeVar, overloadf1from typing import Any, Protocol, TypeVar, overload
n2R = TypeVar('R')n2T1 = TypeVar('T1')
3E = TypeVar('E')3T2 = TypeVar('T2')
44
n5class P(Protocol[R]):n5class P(Protocol[T1]):
66
n7    def __mul__(self, n: int, /) -> R:n7    def __mul__(self, n: int, /) -> T1:
8        ...8        ...
99
n10    def __add__(self, x: R, /) -> R:n10    def __add__(self, x: T1, /) -> T1:
11        ...11        ...
1212
13class _AnyMulSum:13class _AnyMulSum:
1414
15    @overload15    @overload
n16    def __call__(self, a: list[E], b: int, c: list[E]) -> list[E]:n16    def __call__(self, a: list[T2], b: int, c: list[T2]) -> list[T2]:
17        ...17        ...
1818
19    @overload19    @overload
t20    def __call__(self, a: P[R], b: int, c: R) -> R:t20    def __call__(self, a: P[T1], b: int, c: T1) -> T1:
21        ...21        ...
2222
23    def __call__(self, a: Any, b: int, c: Any) -> Any:23    def __call__(self, a: Any, b: int, c: Any) -> Any:
24        return a * b + c24        return a * b + c
25anymulsum = _AnyMulSum()25anymulsum = _AnyMulSum()
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op