Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Numerics;
- class Program
- {
- static void Main()
- {
- BigInteger num = BigInteger.Parse(Console.ReadLine());
- int n = int.Parse(Console.ReadLine());
- BigInteger[] sito = new BigInteger[n];
- for (int i = 0; i < n; i++)
- {
- sito[i] = BigInteger.Parse(Console.ReadLine());
- }
- for (int i = 0; i < n; i++)
- {
- num &= ~(sito[i]);
- }
- BigInteger bits = 0;
- while (num > 0)
- {
- bits += num % 2;
- num /= 2;
- }
- Console.WriteLine(bits);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement