It is impossible to be perfect on everything. Sometimes if we want to do well in A, we cannot do well in B at the same time.
I do know the phrase "at the cost/expense of", which can be applied to the following case:
In China, economic development has often been achieved at the cost/expense of the environment.
But I have also heard people saying something like
You can get A .....charge..... B
You can get A .....price of..... B
You can get A .....payment..... B
Due to my poor listening comprehension, I can't complete the three sentences above(Maybe I misheard what they said completely). But I am wondering if there are any other (fancy) ways to say "you can get A at a cost of B" in different circumstances. Also I wonder if there are expressions for which B can be long sentences.
Thanks in advance!