Ковалев Григорий, 524 группа MulSum 1306
danilaarist MulSum 1409
n1from typing import Protocol, TypeVar, overload, Anyn1from typing import Any, Protocol, TypeVar, overload
2T = TypeVar('T')2T = TypeVar('T')
33
n4class MulAddInt(Protocol[T]):n4class SupportsMulSum(Protocol[T]):
55
n6    def __mul__(self, n: int) -> T:n6    def __mul__(self, n: int, /) -> T:
7        ...7        ...
88
n9    def __rmul__(self, n: int) -> T:n9    def __rmul__(self, n: int, /) -> T:
10        ...10        ...
1111
n12    def __add__(self, other: T) -> T:n12    def __add__(self, other: T, /) -> T:
13        ...13        ...
n14U = TypeVar('U')n14E = TypeVar('E')
1515
16@overload16@overload
n17def anymulsum(a: list[U], b: int, c: list[U]) -> list[U]:n17def anymulsum(a: list[E], b: int, c: list[E], /) -> list[E]:
18    ...18    ...
1919
20@overload20@overload
n21def anymulsum(a: MulAddInt[T], b: int, c: T) -> T:n21def anymulsum(a: SupportsMulSum[T], b: int, c: T, /) -> T:
22    ...22    ...
2323
t24def anymulsum(a: Any, b: int, c: Any) -> Any:t24def anymulsum(a: Any, b: int, c: Any, /) -> Any:
25    return a * b + c25    return a * b + c
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op