fork download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. static void Main(string[] args)
  6. {
  7. String nick = "123abc321";
  8.  
  9. int max = Convert.ToInt32(Math.Pow(2, nick.Length));
  10. for(int i = 0; i < max; i++)
  11. {
  12. String result = "";
  13. for (int j = 0; j < nick.Length; j++)
  14. {
  15. if ((i & Convert.ToInt32(Math.Pow(2, j))) == 0) result += nick[j].ToString().ToLower();
  16. else result += nick[j].ToString().ToUpper();
  17. }
  18. Console.Write(result + "\t");
  19. //if(i%8 == 7)
  20. Console.WriteLine();
  21. }
  22.  
  23. Console.ReadKey();
  24. }
  25. }
Runtime error #stdin #stdout #stderr 0.04s 36528KB
stdin
Standard input is empty
stdout
123abc321	
123abc321	
123abc321	
stderr
Unhandled Exception: System.IndexOutOfRangeException: Array index is out of range.
  at Test.Main (System.String[] args) [0x00000] in <filename unknown>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.IndexOutOfRangeException: Array index is out of range.
  at Test.Main (System.String[] args) [0x00000] in <filename unknown>:0