more hackerrank (naive solution though)