5 views
25 Jan 2026
Given a and b, print a+b, a-b, and a*b on one line....
4 views
25 Jan 2026
Check if n is even or odd....
6 views
25 Jan 2026
Input x lo hi. Print x clamped inside [lo,hi]....
8 views
25 Jan 2026
Given a and b, print a & b....
6 views
25 Jan 2026
Print the bigger of two integers using a ternary expression....
7 views
25 Jan 2026
Swap two integers using XOR and print them....
7 views
25 Jan 2026
Print how many 1-bits are in n....
6 views
25 Jan 2026
Input n and k (0-based). Print 1 if kth bit is set, else 0....
7 views
25 Jan 2026
Input n and k (0-based). Flip kth bit and print new number....
6 views
25 Jan 2026
Given n integers, print XOR of all values....
6 views
25 Jan 2026
Input a b m. Print (a^b) mod m....
7 views
25 Jan 2026
Given n numbers, print bitwise OR of them....
7 views
25 Jan 2026
Input a and b (non-negative). Add them using bit operations only....
8 views
25 Jan 2026
Multiply a and b using only addition and bit shifts....
5 views
25 Jan 2026
Input a b (a>=0, b>0). Print quotient and remainder without using / or %....
5 views
25 Jan 2026
Expression tokens like: number op number op number. Evaluate strictly left-to-right (no precedence). Ops are + - *....
6 views
25 Jan 2026
Start with mask=0. Commands: GRANT k, REVOKE k, CHECK k. k is 0..30. CHECK prints 1/0....
6 views
25 Jan 2026
Given L and R, print XOR of all integers in [L,R]....
8 views
25 Jan 2026
Input a and b. Print how many bit flips to turn a into b....
6 views
25 Jan 2026
Input n. Print gray code g = n ^ (n>>1)....