Here is a solution in the case above. You are given two integer numbers. This repository contains solutions to most of my solved spoj problem.