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)$.