Submission #3005478
Source Code Expand
import java.io.*; class Sample1 { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String str = br.readLine(); char c = Integer.parseInt(str); if(c == "ooo");{ System.out.println("1000"); } if(c == "oox");{ System.out.println("900"); } if(c == "oxo");{ System.out.println("900"); } if(c == "oxx");{ System.out.println("800"); } if(c == "xoo");{ System.out.println("900"); } if(c == "xox");{ System.out.println("800"); } if(c == "xxo");{ System.out.println("800"); } if(c == "xxx");{ System.out.println("700"); } } }
Submission Info
Submission Time | |
---|---|
Task | A - Something on It |
User | efren |
Language | Java8 (OpenJDK 1.8.0) |
Score | 0 |
Code Size | 638 Byte |
Status | CE |
Compile Error
./Main.java:9: error: incompatible types: possible lossy conversion from int to char char c = Integer.parseInt(str); ^ ./Main.java:10: error: incomparable types: char and String if(c == "ooo");{ ^ ./Main.java:13: error: incomparable types: char and String if(c == "oox");{ ^ ./Main.java:16: error: incomparable types: char and String if(c == "oxo");{ ^ ./Main.java:19: error: incomparable types: char and String if(c == "oxx");{ ^ ./Main.java:22: error: incomparable types: char and String if(c == "xoo");{ ^ ./Main.java:25: error: incomparable types: char and String if(c == "xox");{ ^ ./Main.java:28: error: incomparable types: char and String if(c == "xxo");{ ^ ./Main.java:31: error: incomparable types: char and String if(c == "xxx");{ ^ 9 errors