臨機 (rinki) Japanese meaning: suited to the occasion | Kotomora臨機応変 is a four-character idiom meaning to respond flexibly according to the situation.
This problem requires an ad hoc measure.
adapting to the situation; playing it by ear; ad hoc
Etymology
From Chinese 臨機/临机 (línjī), meaning 'to face a situation'. In Japanese, it is almost always part of the compound 臨機応変.