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

×

Please help me in CSUB

https://www.codechef.com/viewsolution/17435589 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, 19:48

pshygo01's gravatar image

1★pshygo01
1
accept rate: 0%

converted to question 13 Feb, 20:03

vijju123's gravatar image

6★vijju123 ♦
14.5k11754


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

Ur ac solution: https://www.codechef.com/viewsolution/17435883

link

answered 13 Feb, 20:22

vivek_1998299's gravatar image

6★vivek_1998299
1.6k29
accept rate: 23%

toggle preview
Preview

Follow this question

By Email:

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

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "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:

×2,536
×1,019
×599

question asked: 13 Feb, 19:48

question was seen: 133 times

last updated: 13 Feb, 20:22