智窮力竭

智穷力竭
zhìqióngjié

at a loss as to what to do; at one's wits' end; at the end of one's rope (both mentally and physically)

Wiktionary

Entry Composition