You are not logged in. Please login at to post your questions!


Please help me in CSUB This is my solution for the problem CSUB,its showing wrong answer after trying many times.Then i saw the editorial and compared every test case by using Editorials logic and mine simultaneously,and there's no difference in Answers.But Anyway its showing Wrong Answer for my Submission.

Can yoou please tell me why its happening so ?

asked 13 Feb '18, 19:48

pshygo01's gravatar image

accept rate: 0%

converted to question 13 Feb '18, 20:03

vijju123's gravatar image

4★vijju123 ♦♦

Thats because of overflow, N^2=10^10 which doesnt fit in int ,use long.

Ur ac solution:


answered 13 Feb '18, 20:22

vivek_1998299's gravatar image

accept rate: 23%

toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:


question asked: 13 Feb '18, 19:48

question was seen: 143 times

last updated: 13 Feb '18, 20:22