Project Euler is like this a lot -- it's presented as a coding challenge but half the problems can be optimized to
return 5 # because mathProject Euler is like this a lot -- it's presented as a coding challenge but half the problems can be optimized to
return 5 # because math
At least the site itself is honest about it, describing the challenges as "mathematical/computer programming problems". I always found it weird when people recommended them as ways to learn a new programming language because, perhaps because of my own math background, I ended up solving most of them with math and so little programming. Where the programs only used the basics of any language so that nothing novel would be learned by rewriting except for how loops look in two different languages (or don't, in the case of some FP languages), or how arrays look, etc.