For example below
when I chose Delphi (for you code from the testing log) - I have got "compilation error"
in all other cases I have got error at execution
9.11 09:07 1. Your Ride Is Here 0 / 200 ошибка компиляции atanas.java DelTA3 at NIT7 Delphi 7
9.11 09:03 1. Your Ride Is Here 0 / 200 не пройден 1-й тест. Решение вызвало ошибку Runtime Error 1:Invalid function number atanas.java DelTA3 at NIT7 Java 6
9.11 09:02 1. Your Ride Is Here 0 / 200 не пройден 1-й тест. Решение вызвало ошибку Runtime Error 1:Invalid function number atanas.java DelTA3 at NIT7 Java 8
9.11 09:01 1. Your Ride Is Here 0 / 200 не пройден 1-й тест. Решение вызвало ошибку Runtime Error 1:Invalid function number atanas.java DelTA3 at NIT7 Java 7
import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Scanner;
class Test {
public static void main(String[] args) throws IOException {
Scanner sc = new Scanner(new File("input.txt"));
PrintWriter pw = new PrintWriter(new File("output.txt"));
if (toNumber(sc.nextLine()) % 47 == toNumber(sc.nextLine()) % 47) {
pw.println("GO");
} else {
pw.println("STAY");
}
pw.close();
}
public static int toNumber(String name) {
int product = 1;
for (int i = 0; i < name.length(); i++) {
int charVal = (name.charAt(i) - 'A') + 1;
product *= charVal;
}
return product;
}
}
Please next time give MORE information
- link on task, copy of DL-log lines etc.