Project Euler is a project by volunteers which has a large archive of mathematical problems ranging from easy to hard level. Programmers are to write code in any programming language to solve the problem and find the correct solution. Every problem has a thread associated with it where users can post their code and check code of fellow users.
The following list contains problems that I’ve solved with the link to the explanation. If you’ve not tried it on your own, I would recommend giving it a try by yourself first before looking at the solution.
BSD 3-Clause License.