title: Write One Line C Function To Find Whether A No Is Power Of Two
signature: def write_one_line_c_function_to_find_whether_a_no_is_power_of_two(n):
source_py: def write_one_line_c_function_to_find_whether_a_no_is_power_of_two(n):
      if (n == 0):
          return False
      while (n != 1):
          if ((n % 2) != 0):
              return False
          n = (n // 2)
      return True
source_cpp: bool write_one_line_c_function_to_find_whether_a_no_is_power_of_two(int n) {
    if ( n == 0 ) return 0;
    while ( n != 1 ) {
      if ( n % 2 != 0 ) return 0;
      n = n / 2;
    }
    return 1;
  }
question_info.test_code: import array
  import bisect
  import collections
  import datetime
  import functools
  import heapq
  import itertools
  import math
  import queue
  import re
  import string
  import sys
  from typing import Any, Dict, List, Optional, Set
  
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  def validate_solution(actual, expected):
      return actual == expected
  
  def driver(n, expected):
      try:
          if validate_solution(PLACEHOLDER_FN_NAME(
              n),
              expected
          ):
              return "PASSED"
          return "FAILED"
      except Exception as exception_obj:
          return type(exception_obj).__name__
      
  if __name__ == "__main__":
      result = driver(1, True)
      print(f"TEST-0...{result}")
  
      result = driver(2, True)
      print(f"TEST-1...{result}")
  
      result = driver(8, True)
      print(f"TEST-2...{result}")
  
      result = driver(1024, True)
      print(f"TEST-3...{result}")
  
      result = driver(24, False)
      print(f"TEST-4...{result}")
  
      result = driver(7, False)
      print(f"TEST-5...{result}")
  
      result = driver(46, False)
      print(f"TEST-6...{result}")
  
      result = driver(61, False)
      print(f"TEST-7...{result}")
  
      result = driver(73, False)
      print(f"TEST-8...{result}")
  
      result = driver(66, False)
      print(f"TEST-9...{result}")
  
      sys.exit(0)
question_info.test_case_ids: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']
question_info.entry_fn_name: write_one_line_c_function_to_find_whether_a_no_is_power_of_two
question_info.test_list: [{"idx": 0, "outputs": true, "inputs": {"n": 1}}, {"idx": 1, "outputs": true, "inputs": {"n": 2}}, {"idx": 2, "outputs": true, "inputs": {"n": 8}}, {"idx": 3, "outputs": true, "inputs": {"n": 1024}}, {"idx": 4, "outputs": false, "inputs": {"n": 24}}, {"idx": 5, "outputs": false, "inputs": {"n": 7}}, {"idx": 6, "outputs": false, "inputs": {"n": 46}}, {"idx": 7, "outputs": false, "inputs": {"n": 61}}, {"idx": 8, "outputs": false, "inputs": {"n": 73}}, {"idx": 9, "outputs": false, "inputs": {"n": 66}}]
question_info.entry_cls_name: Solution