⌨️

[AtCoder]ABC-261|A - Intersection

2023/07/07に公開

設問ページ

提出結果

def getIntMap():
    return map(int, input().split())


def main():
    l1, r1, l2, r2 = getIntMap()

    ln = min(r1, r2) - max(l1, l2)

    print(ln if ln >= 0 else 0)


if __name__ == "__main__":
    main()

Discussion