Intersection

Let a, b, c, d be integers such that a ≤ b and c ≤ d. Write a function
@intersection(a, b, c, d)@ that assuming that intersection of intervals
[a, b] and [c, d] is non empty returns the tuple of integers (p, q) such
that [p, q] = [a, b] ∩ [c, d].

Sample session

Problem information

Author: ProAl

Generation: 2026-01-25T17:33:23.697Z

© Jutge.org, 2006–2026.
https://jutge.org
