For all pairs $(m, n)$ of positive integers that have the same number $k$ of divisors we define the operation $\circ$. Write all their divisors in an ascending order: $1=m_1<\ldots<m_k=m$, $1=n_1<\ldots<n_k=n$ and set
$$
m\circ n= m_1\cdot n_1+\ldots+m_k\cdot n_k. 
$$
Find all pairs of numbers $(m, n)$, $m\geqslant n$, such that $m\circ n=497$.
1. **Understanding the problem**: We need to find pairs of positive integers \((m, n)\) such that \(m \circ n = 497\). The operation \(\circ\) is defined for pairs \((m, n)\) that have the same number \(k\) of divisors. We write the divisors of \(m\) and \(n\) in ascending order and compute \(m \circ n\) as the sum of the products of corresponding divisors.

2. **Initial constraints**: Since \(m \geq n\) and both \(m\) and \(n\) have the same number of divisors \(k\), we need to consider the possible values of \(k\). We also know that \(m \circ n = 497\).

3. **Bounding \(n\)**: 
   \[
   n^2 < m \circ n \implies n^2 < 497 \implies n < \sqrt{497} \approx 22.3 \implies n \leq 22
   \]

4. **Considering possible values of \(k\)**:
   - If \(k\) is prime, then \(m\) and \(n\) would be of the form \(p^{k-1}\) and \(q^{k-1}\) respectively. This would imply that \(pq\) divides \(m \circ n - 1\). However, \(pq\) must divide 496, and the only prime factorization of 496 is \(2^4 \times 31\), which does not fit our requirements.
   - Therefore, \(k\) cannot be prime.

5. **Checking \(k = 4\)**:
   - If \(k = 4\), then \(m\) and \(n\) have 4 divisors each. This implies \(m\) and \(n\) are either of the form \(p^3\) or \(pq\) where \(p\) and \(q\) are distinct primes.
   - For \(k = 4\), we have:
     \[
     m \circ n = (1 + n_2m_2 + n_3m_3 + n_4m_4)
     \]
     - Trying different combinations leads to contradictions, so \(k \neq 4\).

6. **Checking \(k = 6\)**:
   - If \(k = 6\), then \(m\) and \(n\) have 6 divisors each. This implies \(m\) and \(n\) are of the form \(p^5\), \(p^2q\), or \(pqr\) where \(p, q, r\) are distinct primes.
   - For \(k = 6\), we have:
     \[
     m \circ n = 1 + n_2m_2 + n_3m_3 + n_4m_4 + n_5m_5 + n_6m_6 = 497
     \]

7. **Testing specific values**:
   - For \(n = 12\):
     \[
     1 + 2m_2 + 3m_3 + 4m_4 + 6m_5 + 12m_6 = 497
     \]
     - This leads to contradictions as shown in the initial solution.
   - For \(n = 18\):
     \[
     1 + 2m_2 + 3m_3 + 6m_4 + 9m_5 + 18m_6 = 497
     \]
     - Solving this, we find \(m = 20\):
       \[
       1 + 2 \cdot 2 + 3 \cdot 4 + 6 \cdot 5 + 9 \cdot 10 + 18 \cdot 20 = 497
       \]
   - For \(n = 20\):
     \[
     1 + 2m_2 + 4m_3 + 5m_4 + 10m_5 + 20m_6 = 497
     \]
     - This leads to contradictions as shown in the initial solution.

8. **Conclusion**: The only valid pair is \((n, m) = (18, 20)\).

The final answer is \( \boxed{ (18, 20) } \)