Counting multiples of 3 up to a given number
Use your brain, not brute force. How would you solve the problem if it were presented in a math test, and you couldn't use a computer?

Your solution requires \$O(x)\$ time; it should be possible in \$O(1)\$.