think on one's feet

think on one's feet (make a quick decision; have answers ready and express them quickly and clearly; think and react quickly, especially in a situation where things are happening very fast) — за словом в карман не лезть; говорить (выступать, отвечать) без подготовки; давать ответ сходу, иметь хорошую реакцию; быстро соображать

Example 1: I'm glad Ronny's a member of the team. He's smart and quick. He can really think on his feet, and his solutions are always helpful.

Example 2: When you're called on in class, you have to be able to think on your feet.(CDAmE)

Example 3: An ability to think on your feet is a definite advantage when you're doing live comedy shows.(CIDI)

Example 4: I'd never heard about the firm before, so I had to think on my feet.— ...пришлось соображать на ходу. (CALD)

see also
[quick on the uptake]
[bright as a button]
[sharp as a tack ]

Opp.
[hindsight is always twenty-twenty]
[slow on the draw]
20/20 hindsight