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


simple prime number generator question on spoj

my solution is correct n efficient but it is showing runtime error whenever i submit any solution on spoj it happens with me. promlem link my solution link

asked 19 Jul '15, 14:10

rahulsup's gravatar image

accept rate: 0%

You have declared long long a[m] but you are accessing the index which is wrong because 0 to m-1 will be available so just make long long a[m+1]


answered 19 Jul '15, 16:30

apptica's gravatar image

accept rate: 17%

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: 19 Jul '15, 14:10

question was seen: 904 times

last updated: 19 Jul '15, 16:30