use programming language to handle the math problem