fork download
  1. using static System.Console;
  2. using System.Numerics;
  3.  
  4. public class Program {
  5. public static void Main() {
  6. WriteLine(VerificaPermissao((BigInteger)1, (BigInteger)0));
  7. WriteLine(VerificaPermissao((BigInteger)1, (BigInteger)1));
  8. WriteLine(VerificaPermissao((BigInteger)2, (BigInteger)1));
  9. }
  10. public static bool VerificaPermissao(BigInteger perm1, BigInteger perm) => (perm & perm1) != 0;
  11. }
  12.  
  13. //https://pt.stackoverflow.com/q/202352/101
Success #stdin #stdout 0.02s 16108KB
stdin
Standard input is empty
stdout
False
True
False