------
## 最终结论
```python
def min_presses(a, b):
    diff = abs(a - b)  # Calculate the absolute difference between a and b
    presses = 0  # Initialize presses
    for step in [5, 2, 1]:  # Iterate through the predefined step values
        presses += diff // step  # Add the number of presses needed to cover the current difference
        diff %= step  # Reduce the difference using the current step value
    return presses

T = int(input())  # Read the number of test cases
for _ in range(T):  # Iterate over each test case
    a, b = map(int, input().split())  # Read the values for a and b
    print(min_presses(a, b))  # Display the result for each test case
```