Ad
Code
Diff
  • namespace Solution 
    {
      using System;
      
      public static class logic
      {
      
        public static bool  Or(bool i, bool j) { return i.i() + j.i() >= 1; }
        public static bool And(bool i, bool j) { return i.i() + j.i() == 2; }
        public static bool Xor(bool i, bool j) { return i.i() + j.i() == 1; }
        
      }
      
      
      public static class BoolExtensions
      {
          public static int i(this bool val)
          {
              return Convert.ToInt32(val);
          }
      }
    }
    • bool Or(bool i, bool j){ return (i+""+j).Contains("T");}
    • bool And(bool i, bool j) {return !(i+""+j).Contains("F");}
    • bool Xor(bool i, bool j){return i.CompareTo(j)*i.CompareTo(j)>0;}
    • namespace Solution
    • {
    • using System;
    • public static class logic
    • {
    • public static bool Or(bool i, bool j) { return i.i() + j.i() >= 1; }
    • public static bool And(bool i, bool j) { return i.i() + j.i() == 2; }
    • public static bool Xor(bool i, bool j) { return i.i() + j.i() == 1; }
    • }
    • public static class BoolExtensions
    • {
    • public static int i(this bool val)
    • {
    • return Convert.ToInt32(val);
    • }
    • }
    • }