⌨️

[AtCoder]ABC-097|A - Colorful Transceivers

2023/01/19に公開

設問ページ

提出結果

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


def main():
    a, b, c, d = getIntMap()

    print('Yes' if abs(a - c) <= d or (abs(a - b)
          <= d and abs(c - b) <= d) else 'No')


if __name__ == "__main__":
    main()

Discussion