using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { for (int i = 0; i <= 999; i++) { Console.WriteLine( i.ToString("D3")); if (Console.ReadLine() == "unlocked") { string ans = i.ToString("D3"); } } } } }