From b54323fcae5d44a89b62c4c3a3d6eae75f3440d1 Mon Sep 17 00:00:00 2001 From: yenru0 Date: Sun, 11 Aug 2024 16:07:51 +0900 Subject: [PATCH] complete 17262.py --- zeta_python/completed/17262.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 zeta_python/completed/17262.py diff --git a/zeta_python/completed/17262.py b/zeta_python/completed/17262.py new file mode 100644 index 0000000..8e5d23e --- /dev/null +++ b/zeta_python/completed/17262.py @@ -0,0 +1,15 @@ +import sys +from dataclasses import dataclass + +input = sys.stdin.readline + +@dataclass +class interval: + start: int + end: int + + +if __name__ == "__main__": + N = int(input()) + org = [interval(*map(int, input().split())) for _ in range(N)] + print(max([max(org, key=lambda x: x.start).start - min(org, key=lambda x: x.end).end, 0]))