Sort by

recency

|

270 Discussions

|

  • + 0 comments

    There are two testcase that fails, couldn't got yet what are they?

  • + 0 comments

    There are two testcase that fails, couldn't got yet what are they?

  • + 0 comments

    Hi, in the tests 7 and 8 the results are behind int range, so I changed the signature: public static long strangeGrid(int r, int c) and also changed the variable type in the main(): long result = Result.strangeGrid(r, c); All the test are passed now.

  • + 0 comments

    def strangeGrid(r, c): # Write your code here # if r is even : if r%2==0: return int(((((r/2-1)*5+c)*2)-1)) else: return int((((((r-1)/2)*5)+c)*2)-2)

  • + 0 comments

    def strangeGrid(r, c): # Write your code here # if r is even : if r%2==0: return int(((((r/2-1)*5+c)*2)-1)) else: return int((((((r-1)/2)*5)+c)*2)-2)