You are not logged in. Please login at www.codechef.com 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 http://www.spoj.com/problems/PRIME1/ my solution link https://ideone.com/fNK7GR

asked 19 Jul '15, 14:10

rahulsup's gravatar image

1★rahulsup
251211
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]

link

answered 19 Jul '15, 16:30

apptica's gravatar image

5★apptica
939210
accept rate: 17%

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:

×3,706
×530
×18

question asked: 19 Jul '15, 14:10

question was seen: 904 times

last updated: 19 Jul '15, 16:30