Does the statement "There is an algorithm that solves ..." make sense? Let $P(a,b)$ be a class of well-defined problems depending on two parameters.  That is, for each pair $(a,b)$ there is a unique solution to problem $P(a,b)$.  For example, $a,b$ could be integers, and $P(a,b)$ some number theoretic problem, like finding the largest prime factor of $a+b$.
My question is: Does it make sense to state a theorem aking to 
Thm. There exists an algorithm that solves $P(a,b)$ in time $O((ab)^2)$.
I would object that there is always an algorithm which solves $P(a,b)$ in constant time. Namely the algorithm "print the unique solution".  I'm asking this question because I found this formulation in a paper on integer programming.  The authors describe an algorithm, and then make this statement.  The proof is "Take our above algorithm".  I was wondering if they should have formulated the theorem differently, like 
Thm. Algorithm X solves $P(a,b)$ in time $O((ab)^2)$.
 A: I think your difficulty arises from confusing a problem with an instance of a problem.  The square root problem is: For a given non-negative integer $N$, calculate the largest integer $s$ such that $s^2 \le N$. A particular value of $N$ defines an instance of the problem.
Now it is true that for a particular given $N$ there is a constant-time algorithm to solve that instance of the problem.  For example, when $N=173$, the algorithm is simply to print 13 on the output tape and halt. But that does not mean that the problem can be solved in constant time, because the problem contains many instances. To solve the problem, you have to provide a single algorithm to produce the square root for any $N$.
Any problem with only a single instance is trivial.  As you observe, there is a turing machine which halts and prints the answer in constant time.   Any problem with only a single instance is trivial in this way, including the $P=NP$ problem. Yes, there is a constant-time algorithm to solve the question of whether $P=NP$.  (We just don't know yet what it is.)
However, the problem you describe is not like this.  It has many instances, parameterized by $a$ and $b$.  Any single instance is easily solved by a single trivial constant-time algorithm.  But the entire problem isn't because the entire problem requires a solution for given $a$ and $b$.
The trivial algorithms to solve the single instances by printing single numbers don't solve the entire problem because, given $a$ and $b$, you still need to figure out which trivial algorithm is the correct one, and this is decidedly nontrivial—in fact it's the entirety of the problem.
A: Theorem. Algorithm $X$ described above solves $P(a,b)$ in time $O((ab)^2)$.
Corollary. There exists an algorithm $X$ that solves $P(a,b)$ in time $O((ab)^2)$.
Trivial remark. For each pair $(a,b)$, there exists an algorithm $X_{a,b}$ that solves $P(a,b)$ in time $O(1)$.
