'-(으)면 되다' is a pattern phrase.
'-(으)면 되다' is used when we talk about a simple or easy solution. '되다' means in this pattern
'to be enough'. '-으면 되다' is attached to the verb stem ending in a consonant other than 'ㄹ',
and '-면 되다' is attached to the verb stem ending in a vowel and 'ㄹ'.
공부를 할 때 저는 도서관에 가면 됩니다.
Go to the library when I study and it will help.
물건을 살 때 저는 인터넷을 이용하면 됩니다.
Use the internet when I make a purchase.
웃기면 그냥 웃으면 되고
슬프면 그냥 슬퍼하면 되고
If it is funny, just laugh.
If it is sad, just grieve.