- The bits are counted from right to left, starting from bit 0.
- The result of the expression should be either 1 or 0. Print it on the console.
- The only element of the parameter array, will be a positive integer as a string - the number whose 3rd bit you must print.
- Output a single number - 1 or 0 - the value of the 3rd bit, counted from 0 and from right to left.
- You can use
console.logto print the results or you can use
returnto return the answer. Both are correct.
- The input number will always be a valid positive integer number.
- Time limit: 0.2s
- Memory limit: 16MB
Sample test 1
Sample test 2
- Submit your code here