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


How can I edit my code if my submission was wrong

Hello, I am new here,and was struggling while resulting my solutions.Like if I submit a solution, and it give me wrong answer, is there any way i can edit the previously written code?Every time I open the compiler,all the previous code get erased and one has to rewrite again or have to go to my submission to copy paste the code. Is there any better option or codechef works this way only?

asked 05 Jan '15, 23:48

rishbz's gravatar image

accept rate: 50%

I don't understand, how do your previous code get erase?
Use Codeblocks software where you need to save the code before running!! And as far my knowledge there is no other way to edit your code..!

Might be in Codechef's compiler you may do that.. but not confirmed!


answered 06 Jan '15, 00:37

rishabhprsd7's gravatar image

accept rate: 14%

edited 06 Jan '15, 00:40

Yes, according to my knowledge, that is the way it works.

You cannot test the code in the editor provided on 'submit' page. So I think it is assumed that a user will not normally resubmit the code without testing it on their system first.


answered 06 Jan '15, 00:15

aalhadkulkarni's gravatar image

accept rate: 8%

edited 06 Jan '15, 00:16

Oh! I thought it works like SPOJ, where you can edit your code if compiling goes wrong.Thanks for clarifying .

(06 Jan '15, 19:43) rishbz3★

But what if we have committed some mistake that we realize later or copied some wrong code from codeblocks or if I come up with better logic.

There should be an option to resubmit/edit your code.


answered 10 Jan, 17:38

cipher_123_'s gravatar image

accept rate: 0%

Better To use Some online IDEs like ideone and compile and run your codes with specified input cases.The You can just copy and paste the code after clicking on the submit button below whre the problem is present. Hope this will help u for further coding. Happy Coding!


answered 10 Jan, 17:56

csk111165's gravatar image

accept rate: 0%

never use an online ide, if you use it, keep visibility as private

(13 Jan, 02:06) neilit19923★

Codechef has the 'My Submissions' section where all your past submissions(Unsuccessful too!) are listed. Just copy the code you want to edit. Make changes to it in the editor and submit it.


answered 12 Jan, 15:51

drp48603's gravatar image

accept rate: 0%

You can use online IDE of codechef itself. It saves our codes too but only the last submitted one. Even you can select the question and submit from there only if you wan


answered 12 Jan, 16:43

monalshadi's gravatar image

accept rate: 20%

edited 12 Jan, 16:44

Use codechef's online IDE.It will save your code. For writing new code and saving the old one, just open a new tab and code on. Otherwise I would suggest you to download a IDE on your desktop like Code::Blocks for C/C++ or Eclipse for Java.That should be better, as you can save templates there for commonly written codes, which increases your speed while implementing as you don't have to write everything from scratch.


answered 13 Jan, 09:31

rajarshi_basu's gravatar image

accept rate: 10%

Use to write your codes. I provides immense flexibility even to submit the code directly.


answered 27 Mar, 11:14

techbuzz's gravatar image

accept rate: 0%

edited 27 Mar, 12:10

if this happens then go to my submissions copy your code from there and then edit your code accordingly


answered 27 Mar, 15:27

punee9011's gravatar image

accept rate: 0%

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



Asked: 05 Jan '15, 23:48

Seen: 4,751 times

Last updated: 27 Mar, 15:27