Hello. I am Math High-school graduate(excellent grades) and a Informatics student. I have attended a lot of Informatics/Mathematics contets. I have experience in designing and implementing algorithms. Also I have written hundreds of programs like the one you require, so it will be a piece of cake for me. Will complete it in a few hours.