Gray Code Value

PHP Hard 5 views
Back to Questions

Problem Description

Input n. Print gray code g = n ^ (n>>1).

Input Format

One integer n.

Output Format

One integer g.

Sample Test Case

Input:
10
Output:
15

Constraints

0

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev