結果 : nested loop hackerrank solution