Created
July 17, 2016 13:53
-
-
Save Jack-Saleem/4213846b08c1de54ca946f565da9ae11 to your computer and use it in GitHub Desktop.
codeforces 100935C OCR program in java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
public class OCR | |
{ | |
public static void main(String[] args) | |
{ | |
Scanner z=new Scanner(System.in); | |
int n=z.nextInt(); | |
int temp=0; | |
String op=""; | |
int cnt=1; | |
while(true) | |
{ | |
temp++; | |
int a=z.nextInt(); | |
int b=z.nextInt(); | |
String x=""; | |
int y=0; | |
for(int i=0;i<a;i++){ | |
x=z.next(); | |
if(x.indexOf(".**")!=-1 && x.indexOf("**.")!=-1) | |
y++; | |
} | |
if(y==2) | |
op+="Case "+cnt+++": Zero\n"; | |
else | |
op+="Case "+cnt+++": Eight\n"; | |
if(temp==n) | |
break; | |
} | |
System.out.println(op); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment