Selected Math Olympiad problems solvable using student programming (Part 2)

Authors

  • Ladislav Perk Faculty of Science, J. E. Purkyně University, Ústí nad Labem

Abstract

This article follows on from the first part of a series devoted to solving selected problems from the Mathematical Olympiad using "student" programming in Python. It presents five additional problems of various types (working with integer ratios, NSD/NSN, product pyramid, quadratic equations, and algebra programs). It shows how systematic searching of the state space can be used to verify the conditions of the assignment and obtain all solutions. Each task includes annotated source codes and a discussion of which programming techniques are didactically beneficial and where, on the contrary, there is a risk of unnecessary computational complexity or confusion (e.g., multiple nested loops). It also includes a demonstration of more advanced Python syntactic constructs (especially from the itertools library) as an alternative to classic looping and manual condition testing. The text thus provides concrete inspiration for teachers on how to link mathematical tasks with elementary algorithmic thinking while cultivating a style of program notation that remains understandable for students.

Published

2026-02-28

How to Cite

Perk, L. (2026). Selected Math Olympiad problems solvable using student programming (Part 2). MATHEMATICS–PHYSICS–INFORMATICS, 35(1), 51–62. Retrieved from https://mfi.upol.cz/index.php/mfi/article/view/1076

Issue

Section

Informatics