Shopee interview question

Some logic math questions and small coding exercises that could be LC easy/medium level