/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package Die; import java.util.ArrayList; import java.util.HashMap; import java.util.Map; import java.util.Scanner; /** * * @author cteam010 */ public class Die { public static Map die = new HashMap<>(); public static void init(){ die.put("::::o::::", 1); die.put("o:::::::o", 2); die.put("::o:::o::", 2); die.put("o:::o:::o", 3); die.put("::o:o:o::", 3); die.put("o:o:::o:o", 4); die.put("o:o:o:o:o", 5); die.put("ooo:::ooo", 6); die.put("o:oo:oo:o", 6); } public static Integer comp(String d){ for(String c: die.keySet()){ if(c.equalsIgnoreCase(d)){ return die.get(c); } } return 0; } public static void main(String[] args) { Scanner sc = new Scanner(System.in); String d = sc.next(); d+= sc.next(); d+= sc.next(); init(); Integer result = comp(d); if(result == 0) System.out.println("uknown"); else System.out.println(result); } }