1  // Combination Lock                             Bill Rubin
   2  using System;
   3  using System.IO;
   4  using System.Diagnostics;
   5  
   6  class Program {
   7      [STAThread]
   8      static void Main(string[] args) {
   9          try {
  10              // Read N
  11              int N = Convert.ToInt32(args[0]);
  12  
  13              // Execute test case:
  14              CrackingSequence crackingSequence = new CrackingSequence(N);
  15              crackingSequence.execute();
  16  
  17              // Translate result to ascii:
  18              for(int k = 0; k<crackingSequence.sequence_.Length; k++) 
  19                  crackingSequence.sequence_[k] = "0123456789"[crackingSequence.sequence_[k]];
  20  
  21              // Write result to output:
  22              Console.Write(crackingSequence.sequence_);
  23          }
  24          catch (Exception x) { Console.Write(x.Message.ToString()); }
  25      }
  26  
  27  }