If you haven't done it yet, please review this web pages related to Java in the judge:
http://acm.uva.es/problemset/java.html
http://acm.uva.es/problemset/howtows.html#java
http://acm.uva.es/problemset/data/p100.java.html
Best regards,
Fernando N
Java Support in the Judge
Moderator: Board moderators
the example code doesn't even work ...
the example code doesn't even work ...
it still gets compile error ....
i tried tons of times .....
[/java]
it still gets compile error ....
i tried tons of times .....
![:cry:](./images/smilies/icon_cry.gif)
Solution...
I couldnt get the java mail submission to work, but if you submit using the online form on the web site it works fine. The only problem is that the big number class and other such usefull java classes (they're the only reason I would use java
) dont seem to be on the servers.
ciao
EZE
![:P](./images/smilies/icon_razz.gif)
ciao
EZE
-
- New poster
- Posts: 2
- Joined: Thu Jan 27, 2005 8:25 am
You don't have permission to access /p/data/p100.java.html o
Hello,
I have intend view the code from: http://acm.uva.es/p/data/p100.java.html and not it is disponible. Please help me. I need this code.
Excuse my english. I am speaking spanish. I am venzuelan.
I have intend view the code from: http://acm.uva.es/p/data/p100.java.html and not it is disponible. Please help me. I need this code.
Excuse my english. I am speaking spanish. I am venzuelan.
-
- New poster
- Posts: 5
- Joined: Mon Mar 31, 2008 12:49 am
Re: Java Support in the Judge
Because there is some lack of up to date information about sending in solutions in Java:
You can use this code frame as a start:
You can use this code frame as a start:
Code: Select all
import java.util.Scanner;
class Main {
public static void main(String[] args) {
new Main().solveProblem();
}
public void solveProblem() {
final Scanner scanner = new Scanner(System.in);
while (scanner.hasNextInt()) {
int input = scanner.nextInt();
int solution = solveCase(input);
System.out.println(solution);
}
scanner.close();
}
public int solveCase(int number)
{
int solution = number + number;
return solution;
}
}
Re: Java Support in the Judge
hi,
i'm trying to solve the problem 10055 - Hashmat the Brave Warrior, i have the next code, this code is running fine in my eclipse , but when i submit the code to the judge, they answer me:
"Your submission with number 9597827 for the problem 10055 - Hashmat the Brave Warrior has failed with verdict Runtime error.
This means that the execution of your program didn't finish properly. Remember to always terminate your code with the exit code 0."
is this problem recomended to make in java to submit to the judged? i'm a begginner, please help me with any information about how i can modify this code to submit in java?
The Code:
import java.util.Scanner;
class TheBraveWarrior {
public static void main(String[] args){
new TheBraveWarrior().solveProblem();
}
void solveProblem(){
Scanner in=new Scanner(System.in);
long num=0,num2=0;
while(num <= Math.pow(2, 32) && num2 <= Math.pow(2, 32)){
num=in.nextLong();
num2=in.nextLong();
printLine(num,num2);
if(in.hasNext("0"))break;
}
in.close();
}
void printLine(long num,long num2){
long res=0;
if(num>num2)
res=num-num2;
else
res=num2-num;
System.out.println(res);
}
}
Thanks for your attention.
i'm trying to solve the problem 10055 - Hashmat the Brave Warrior, i have the next code, this code is running fine in my eclipse , but when i submit the code to the judge, they answer me:
"Your submission with number 9597827 for the problem 10055 - Hashmat the Brave Warrior has failed with verdict Runtime error.
This means that the execution of your program didn't finish properly. Remember to always terminate your code with the exit code 0."
is this problem recomended to make in java to submit to the judged? i'm a begginner, please help me with any information about how i can modify this code to submit in java?
The Code:
import java.util.Scanner;
class TheBraveWarrior {
public static void main(String[] args){
new TheBraveWarrior().solveProblem();
}
void solveProblem(){
Scanner in=new Scanner(System.in);
long num=0,num2=0;
while(num <= Math.pow(2, 32) && num2 <= Math.pow(2, 32)){
num=in.nextLong();
num2=in.nextLong();
printLine(num,num2);
if(in.hasNext("0"))break;
}
in.close();
}
void printLine(long num,long num2){
long res=0;
if(num>num2)
res=num-num2;
else
res=num2-num;
System.out.println(res);
}
}
Thanks for your attention.