Hi guys. I’m trying to solve the double string problem (which is obviously trivial). For the sake of not spoiling, I’ve deleted the important bits from my code below. I’m positive I’ve got the correct answer, but still I’m getting a message that says "Your solution from 2012-04-02 17:09:39 to DOUBLE, written in JAVA ran for 1.35 seconds, but produced wrong result. "
Hence, I believe my output is wrong. I’ve tried using print and using println, but neither yield positive results.
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws Exception {
Scanner scanner = new Scanner(System.in);
int n = scanner.nextInt();
for (int i = 0; i < n; i++) {
n = scanner.nextInt();
/* Some magic happens here*/
System.out.print(n);
}
}
}
Thanks!