This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from typing import TYPE_CHECKING, Iterable, TypeVar, Union, cast | |
if TYPE_CHECKING: | |
from typing import reveal_type # type: ignore | |
else: | |
reveal_type = lambda x: x # noqa | |
_T = TypeVar("_T") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while True: | |
try: | |
num = int(input() or 0) | |
except EOFError: | |
num = 0 | |
if not num: | |
break | |
chars_saved = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Triangulo: | |
def __init__(self, a, b, c): | |
self.a = a | |
self.b = b | |
self.c = c | |
def gerar_lados_ordenados(self): | |
return sorted([self.a, self.b, self.c]) | |
def semelhantes(self, triangulo): |