<commit_before>/**
    @file    power_of_2_solution2.cpp
    @author  <NAME> (altantur)
    @purpose Find out given integer is power of 2
    @version 1.0 21/11/17
*/
#include <iostream>
#include <fstream>
using namespace std;

bool is_pow_two(int a){
  // If given a is power of 2 should (a & (a - 1)) = 0 
  // If given a is zero we will return false
  return (a && !(a & (a - 1)));
}

int main(){

    // Getting user input
    int a;
    cin >> a;

    is_pow_two(a) ? cout << "Yes" : cout << "No";
    cout << endl;

    return 0;
}<commit_msg>is number power of 2 alternative solutions<commit_after>/**
    @file    power_of_2_solution2.cpp
    @author  <NAME> (altantur)
    @purpose Find out given integer is power of 2
    @version 1.0 21/11/17
*/
#include <iostream>
#include <fstream>
using namespace std;

bool is_pow_two(int a){
  // If given a is power of 2 should (a & (a - 1)) = 0
  // If given a is zero we will return false
  return (a && !(a & (a - 1)));
}

int main(){

    // Getting user input
    int a;
    cin >> a;

    is_pow_two(a) ? cout << "Yes" : cout << "No";
    cout << endl;

    return 0;
}
{'fraction_non_alphanumeric': 0.1438721136767318, 'fraction_numerical': 0.02930728241563055, 'mean_word_length': 2.478395061728395, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4664020', 'n_tokens_mistral': 441, 'n_tokens_neox': 407, 'n_words': 150}