Reader reader;
String inp[] = null;
StringBuilder builder = new StringBuilder();
int temp = 0;
try {
reader = new FileReader(
"test.in");
BufferedReader bufReader = new BufferedReader(reader);
inp = new String[Integer.parseInt(new
String(bufReader.readLine()))+1];
while ((inp[temp++]=bufReader.readLine()) != null) {
}
File file = new File(
"test.in");
FileWriter writer = new FileWriter(file);
char arrTemp[]=null;
for (int i = 0; i < inp.length; i++) {
if(inp[i] != null )
{
arrTemp = inp[i].toCharArray();
}
else
break;
builder.append("Case #" + (i + 1) + ": " +
builder);
for (int j = 0; j < arrTemp.length; j++) {
builder.append(getReplacement(arrTemp[j]));
}
writer.write(builder.toString() + "\n");
builder = new StringBuilder();
}
writer.close();
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
I have written code like this.for getting input and printing output.My system
its running fine but in online editor of google its giving error like this.
Submission for input A-small Rejected: Your output file contains 0 test cases
instead of the expected 30.
You can learn more about rejections like this in our FAQ.
what may be the problem?
--
You received this message because you are subscribed to the Google Groups
"Google Code Jam" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/google-code/47feea95-c0b2-4b97-a138-0199c6cced47%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.