• + 1 comment

    A solution template for Java is wrong. You should change the return type from int to long,