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

×

need help in python

i solved many problems in codechef.but while uploading it and running it in the codechef there occurs nzec error...but i am not clear about that..i thought for many days that mistake in my part only..but now i came to know that for example,i take a easy problem in codechef and see one successful submission in codechef in python....i uploaded the same and try how he has solved...but this time also there occurs nzec error...what should i do? anyone please help me to figure it out

asked 13 Feb, 20:26

itzmerahul's gravatar image

0★itzmerahul
1
accept rate: 0%

Can you provide solution link to check

(13 Feb, 20:38) vichitr5★

https://www.codechef.com/viewsolution/23103099...i copied from this coder for testing my python compiler but this codechef online running compiler show nzec error for all my codes till now..i have succesful completed 4 to 5 medium hard problems while uploading it in codechef compiler nzec error occurs.anyone please help me

(18 Feb, 21:21) itzmerahul0★

hiiii @itzmerahul ...happy to see a pythonic guy.... I literally code in Python only....(use C and C++ in very rare cases...kind of questions in which we need a static matrix or something similar to it...) . I think I approximately solved more than 200 problems with python only...(all belongs to beginner level and easy level...hahahha)...Initially on Codechef , many a times I also get that NZEC Error . but to get rid of that always read input using the strip() function . mostly it helps , For ex --- (Python3)

    T=int(input().split())

or you can do this in my way also....first I import system then using it I read the input

   from sys import stdin,stdout
   T=int(stdin.readline().strip())

After I start using strip() function , I dont remember when I got NZEC error last time... and a last advice from side , many people who do CP on really hard basis , they will always tell you leave Python , join C++ community....but it is not a very hard and fast rule that a person with Python can't do CP . It really depends upon your algorithms , how you treat the question...

If you have any query regarding python , you can ask me anytime... HAPPY CODING ;

link

answered 18 Feb, 22:40

chaudhary_19's gravatar image

4★chaudhary_19
11
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:

×528

question asked: 13 Feb, 20:26

question was seen: 91 times

last updated: 18 Feb, 22:40