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

×

How to submit java code?

I am new to codechef. And i am doing chef and stone problem. I have written the code. When i submit it, it shows run time error. My code is right, i have run it on various test cases. I think i am taking input in wrong way. Can anyone tell me how to take input like if a file is needed or what? so that code can execute here correctly?

asked 03 Jan '15, 16:12

krazygaurav93's gravatar image

1★krazygaurav93
111
accept rate: 0%

retagged 03 Jan '15, 16:20

gvaibhav21's gravatar image

7★gvaibhav21
88727


The problem you are doing is in a running contest, so for that we can`t see your submission.

For now you can try doing a question in the practise section and that can help you how to take input in JAVA, because the method is same for all the problems.

I would suggest you to do the TEST problem.

Hope it Helps.

Happy Coding!!!

link

answered 03 Jan '15, 16:23

the65bit's gravatar image

4★the65bit
1.1k101327
accept rate: 13%

try this piece of code: for original refer : http://codeforces.com/contest/497/submission/9164069 the code template belongs to Petr Mitrichev-> his blog

there is a sample solution for TEST is at solution_TEST_Java I recommend to read the template from Petr's profile, It should definitely help. And remember that java class that is named "Main" and is public will only run. If not found will throw compile error.

to read data like

1
3 10
3 4 5
4 4 5

you can use the above template.

link

answered 03 Jan '15, 19:07

pikaynu's gravatar image

5★pikaynu
263
accept rate: 33%

May be array index error,divide by zero,wrong input method,

link

answered 04 Jan '15, 00:29

ambika93's gravatar image

2★ambika93
8128
accept rate: 0%

I didn't get it. What is wrong here. i tried to attach the whole source file. its not even working. i mean it still saying ERROR but my Code is perfectly Alright. So how can i submit my java code?

link

answered 29 Dec '15, 20:37

mitul3301's gravatar image

0★mitul3301
1
accept rate: 0%

Following this post. Faced this problem.

Spark Interact 11 Barclay Street Marrickville NSW 2204 Phone: 1300 799 858

link

answered 31 Dec '15, 09:05

zunnunreza's gravatar image

0★zunnunreza
1
accept rate: 0%

check if u r exceeding the time limit

link

answered 22 Jan '16, 01:31

johny_blaze's gravatar image

0★johny_blaze
1
accept rate: 0%

I have the same problem.

link

answered 20 Dec '16, 13:42

aung_khant's gravatar image

0★aung_khant
1
accept rate: 0%

I am trying to submit my java code, but after I click submit, the page reloads and an empty code editor shows up, as if I never wrote any code(or uploaded any java file). Tried both ways - uploading src code file - copying my src code to the codechef editor. Just doesn't seem to work.

Any help? Thank you.

link

answered 11 Mar, 01:12

aminotaur's gravatar image

2★aminotaur
1
accept rate: 0%

edited 11 Mar, 01:13

I need help, im doing java.io.BufferedReader reader = new java.io.BufferedReader (new InputStreamReader(System.in)); then reader.readLine() but its returning null. Sorry for posting an answer because Im not allowed to ask questions even though im a beginner.

link
This answer is marked "community wiki".

answered 09 Nov, 04:21

larrylawrence's gravatar image

1★larrylawrence
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:

×1,980
×1,064
×294
×143

question asked: 03 Jan '15, 16:12

question was seen: 8,301 times

last updated: 09 Nov, 04:21