Tibre interview question

Typical three hackerrank questions, can be answered by python or c++