AtCoder Beginners Contest 086[A to C]

Tasks

 

A. Product … Simple if else based on modulus

 

B. 1 21 … Inputs can be concatenated as they are strings, and cast the result and make them integer. math.sqrt function make the integer into float. compare resulting float and integer.

 

C. Traveling … First I tried to brute force all the path, but it will end up 4^N and it cannot be completed in time. With the below code, the cost is only N.