codility performance bug :)