Hackerrank 1 problem; codeforces 2 problems