codeeval 168 (incomplete)