Samsung Electronics Interview Question

solve taylor without loop