Ad
Code
Diff
  • using System;
    using System.Linq;
    
    namespace Solution{
      public class ToAscii
      {
          public static int GetAsciiSum(string s) => s.Sum(x => x);
      }
    }
    • using System;
    • using System.Linq;
    • namespace Solution{
    • public class ToAsci
    • public class ToAscii
    • {
    • public static int getAsciSum(string s) => s.ToList().Sum(e => (int)e);
    • public static int GetAsciiSum(string s) => s.Sum(x => x);
    • }
    • }