Also please explain your alrogithm and what the variables are for. Using single letter variable names makes the code completely unreadable.