Project Euler #6: Sum square difference

  • + 0 comments

    long n1=(n*(n+1)/2); long n2=(n*(n+1)*(2*n+1))/6; by using this formula it give wrong out put 10000 by using normal traditonl method using loop gives correct answer is there any one discuss on this .