code for online judge in leetcode