fork(1) 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) {
  11. return (perm & perm1) != 0;
  12. }
  13. }
  14.  
  15. //https://pt.stackoverflow.com/q/202352/101
Success #stdin #stdout 0.01s 131200KB
stdin
Standard input is empty
stdout
False
True
False