fork download
  1. using System;
  2. using System.Linq;
  3.  
  4. namespace RedditDailyProgrammer
  5. {
  6. class Program
  7. {
  8. static void Main(string[] args)
  9. {
  10. Console.WriteLine(number110Decode("Jr;;p ept;f"));
  11. Console.WriteLine(number110Decode("Lmiyj od ,u jrtp"));
  12. Console.WriteLine(number110Decode("Trffoy $22- Dp;brf/"));
  13. }
  14.  
  15. static string number110Decode(string msg)
  16. {
  17. string unshift = " QWERTYUIOP{}ASDFGHJKL:\"ZXCVBNM<>?qwertyuiop[]asdfghjkl;'zxcvbnm,./~!@#$%^&*()_+`1234567890-=";
  18. return new string(msg.Select((ch) => unshift[Math.Max(unshift.IndexOf(ch) - 1, 0)]).ToArray());
  19. }
  20. }
  21. }
  22.  
Success #stdin #stdout 0.04s 36912KB
stdin
Standard input is empty
stdout
Hello world
Knuth is my hero
Reddit #110 Solved.