Comments

B problem was fun to solve! Thanks for such questions :)

Thanks a lot for sharing your solution! it helped me a lot