Sign in
or
Register
Courses
Textbook
Compiler
Contests
Topics
Courses
Arithmetic
Binary shifts (C++)
Module:
Binary shifts (C++)
Problem
4
/4
Checking if a number is a power of two
Problem
Given a number
x
. Check if a number is a power of two.
Add the missing piece of code to the program.
Examples
#
Input
Output
1
2
1
2
3
0
Запрещенные операторы: if
1000
ms
256 Mb
Rules for program design and list of errors in automatic problem checking
Teacher commentary