5. How many pairs of positive integers $(a, b)$ are there, both not exceeding 10 , such that $a \leq \operatorname{gcd}(a, b) \leq b$ and $a \leq \operatorname{lcm}(a, b) \leq b$ ?
Answer: 27
Solution: $\operatorname{gcd}(a, b) \geq a \Longrightarrow \operatorname{gcd}(a, b)=a$. Likewise, $\operatorname{lcm}(a, b)=b$. This can only happen if $b$ is a multiple of $a$. Hence the answer is $10+5+3+2+2+1+1+1+1+1=27$.