随机应变

suí jī yìng biàn

to change according to the situation (idiom); pragmatic

suí

to follow

(bound form) machine; mechanism

yìng

to answer

biàn

to change