sick solution for euler54