or hit upon
1.
If you hit on an idea or a solution to a problem, or hit upon it, you think of it.
After running through the numbers in every possible combination, we finally hit on a solution.
= stumble on
PHRASAL VERB : V P n
2.
If someone hits on you, they speak or behave in a way that shows they want to have a sexual relationship with you. ( INFORMAL )
She was hitting on me and I was surprised and flattered.
PHRASAL VERB : V P n