Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Main {
- public static void main(String[] args) {
- Scanner sc = new Scanner(System.in);
- String ch = sc.nextLine();
- String number = sc.nextLine();
- char label = ch.charAt(0);
- int rank = Integer.parseInt(number);
- if (((label == 'a' || label == 'c' || label == 'e' || label == 'g')
- && (rank == 1 || rank == 3 || rank == 5 || rank == 7))
- || ((label == 'b' || label == 'd' || label == 'f' || label == 'h')
- && (rank == 2 || rank == 4 || rank == 6 || rank == 8))) {
- System.out.println("dark");
- } else {
- System.out.println("light");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement