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

×

Help me resolve a run-time error please.

Following is my solution to the deputy chef problem.An NZEC run-time error is occuring when I submit this solution.I read a little about NZEC but could not figure out why it is occuring in my prrogram and what should I do to remove it.Please can anyone help me with this?Thanks.Here is my solution.

asked 16 Feb, 13:27

psnarsikar27's gravatar image

1★psnarsikar27
02
accept rate: 0%

edited 16 Feb, 13:28


In line 9 : n should be n-1 as n will cause out of range error. In line 11 : You should compare with n-1 as range function iterates till n-1 In line 12 : n-1 should be n-2 and similarly n should be n-1 In line 15&16 : you have used i => it should be j

link

answered 17 Feb, 14:29

realnimish's gravatar image

4★realnimish
1
accept rate: 0%

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:

×129

question asked: 16 Feb, 13:27

question was seen: 81 times

last updated: 17 Feb, 14:29