fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. typedef unsigned long long ll;
  5.  
  6. int main() {
  7. // your code goes here
  8.  
  9. ll x=0ll;
  10.  
  11. int pos=1;
  12. for(int i=0;i<8;i++){
  13. if(i%3==0){
  14. x|=1ll<<pos;
  15. }
  16. pos+=8;
  17. }
  18.  
  19. int c=__builtin_popcountll(x);
  20.  
  21. cout<<8-c<<endl;
  22.  
  23. return 0;
  24. }
Success #stdin #stdout 0.01s 5352KB
stdin
Standard input is empty
stdout
5