using System; using System.Collections.Generic; using System.Text; using System.Linq; class Program { public void Proc() { Dictionary dic = new Dictionary(); for(int i=0; i<=9; i++) { Console.WriteLine(string.Empty.PadLeft(10, i.ToString()[0])); string[] ret = Console.ReadLine().Split(' '); int num = int.Parse(ret[0]); if(num == 10) { return; } dic.Add(i, num); } if(dic.Count(a=>a.Value == 0) > 0) { Nullable[] map = new Nullable[10]; int umeNum = dic.Where(a=>a.Value == 0).First().Key; for(int i=0; i<9; i++) { if(dic[i] == 0) { continue; } for(int j=0; jumeNum).ToArray(); lst[k] = i; Console.WriteLine(string.Join(string.Empty, lst)); string[] ret = Console.ReadLine().Split(' '); int cnt = int.Parse(ret[0]); if(cnt == 10) { return; } if(cnt == 1) { map[k] = i; break; } } } } Console.WriteLine(string.Join(string.Empty, map)); string ans = Console.ReadLine(); } else { Nullable[] map = new Nullable[10]; for(int i=0; i<= 8; i++) { for(int j=0; j<10; j++) { if(map[j] != null) { continue; } int[] tmp = new int[10]; tmp = tmp.ToList().Select(a=> 9).ToArray(); tmp[j] = i; Console.WriteLine(string.Join(string.Empty, tmp)); string[] ret = Console.ReadLine().Split(' '); int cnt = int.Parse(ret[0]); if(cnt == 10) { return; } if(cnt == 2) { map[j] = i; break; } } } for(int i=0; i