Page 2 of 4
Re: 11946 - Code Number
Posted: Wed Feb 15, 2012 12:14 am
by brianfry713
You're reading and writing to files.
Re: 11946 - Code Number
Posted: Wed Feb 15, 2012 11:19 am
by alfar01
still get WA after removing the code of file reading
Re: 11946 - Code Number
Posted: Fri Feb 17, 2012 9:36 pm
by brianfry713
For the sample input, you're not printing a newline at the end of the output.
Re: 11946 - Code Number
Posted: Tue Jun 12, 2012 4:24 am
by mahade hasan
In this sample input
H3LL0 MY L0V3, 1 M H499Y 83C4U53 500N 1 W1LL 83 70 Y0UR 51D3.
7H15 71M3 W17H0U7 Y0U H45 833N 373RN4L. 1 1NV173 Y0U 70 7H3 200
0N3 70 533 7H3 238R42 4ND 60R1L42.
here 2==Z and 2==S somewhere in output
HELLO MY LOVE, I M HAPPY BECAUSE SOON I WILL BE TO YOUR SIDE.
THIS TIME WITHOUT YOU HAS BEEN ETERNAL. I INVITE YOU TO THE ZOO
ONE TO SEE THE ZEBRAS AND GORILAS.
it's confuse me..................
Re: 11946 - Code Number
Posted: Tue Jun 12, 2012 11:28 pm
by brianfry713
5 should be S, 2 is Z. The sample I/O at the bottom of the problem statement is correct, the one in the middle is wrong.
Re: 11946 - Code Number
Posted: Wed Jun 13, 2012 9:28 am
by mahade hasan
cut>>thanks for help!!
Re: 11946 - Code Number WHY WA?PLZ HELP!
Posted: Wed Jun 13, 2012 4:59 pm
by Evan72
Re: 11946 - Code Number
Posted: Wed Jun 13, 2012 11:02 pm
by brianfry713
mahade hasan wrote:now i m dealing with WAWAWA!!
I had them switched, 5 should be S, 2 is Z.
Re: 11946 - Code Number WHY WA?PLZ HELP!
Posted: Wed Jun 13, 2012 11:04 pm
by brianfry713
Evan72, You need to copy the newlines.
Re: 11946 - Code Number
Posted: Thu Jun 14, 2012 8:25 am
by mahade hasan
brianfry713 wrote:mahade hasan wrote:now i m dealing with WAWAWA!!
I had them switched, 5 should be S, 2 is Z.
thanks for help.........
Re: 11946 - Code Number WHY WA?PLZ HELP!
Posted: Fri Jun 15, 2012 10:39 pm
by Evan72
brianfry713 wrote:Evan72, You need to copy the newlines.
Thanx..got AC

Re: 11946 - Code Number
Posted: Thu Jul 11, 2013 12:29 pm
by ashdboss
Getting wrong answer for 11946. Need help
deleting code.got the problem. Accepted. 
Re: 11946 - Code Number
Posted: Wed Sep 25, 2013 2:58 am
by nildorpon
Why Runtime error?
Please take a look on my code
import java.io.BufferedInputStream;
import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner scanner = new Scanner(new BufferedInputStream(System.in));
int t = 0;
String str = "";
StringBuilder sb = null;
while (scanner.hasNext()){
t =Integer.parseInt(scanner.nextLine());
if((t>= 1) && (t<=30)){
for(int i = 0; i<t;i++){
boolean isTrue = true;
while(isTrue){
str = scanner.nextLine();
if(str.equals("")){
isTrue = false;
}else {
sb = new StringBuilder();
for(int j = 0; j< str.length(); j++){
sb.append(getValue(str.charAt(j)));
}
System.out.println(sb);
}
}
System.out.println();
}
}
}
}
private static char getValue(char c){
char value;
switch (c){
case '3': value = 'E';
break;
case '0': value = 'O';
break;
case '4': value = 'A';
break;
case '9': value = 'P';
break;
case '8': value = 'B';
break;
case '5': value = 'S';
break;
case '7': value = 'T';
break;
case '2': value = 'Z';
break;
case '6': value = 'G';
break;
case '1': value = 'I';
break;
default:value = c;
break;
}
return value;
}
}
Re: 11946 - Code Number
Posted: Sat Sep 28, 2013 12:27 am
by brianfry713
Re: 11946 - Code Number
Posted: Mon Mar 17, 2014 12:57 pm
by uDebug
Replying to follow the thread.