3 views
24 Jan 2026
Input has two integers a and b and an operator op are provided (+, -, *, /, %). For / do integer floor division like Python //. Output the result....
2 views
24 Jan 2026
Input has two integers a and b are provided (b != 0). Output quotient (a//b) and remainder (a%b) in one line....
3 views
24 Jan 2026
Read one integer n. Output EVEN if n is even else ODD....
3 views
24 Jan 2026
Read two integers a and b. Output < if a if a>b else =....
2 views
24 Jan 2026
Read three integers x L R. Output YES if L...
4 views
24 Jan 2026
Read three integers a b c. Output the minimum using operators and comparisons....
2 views
24 Jan 2026
Read two non-negative integers a and b. Output a & b....
2 views
24 Jan 2026
Read two non-negative integers a and b. Output a | b....
2 views
24 Jan 2026
Read two non-negative integers a and b. Output a ^ b....
3 views
24 Jan 2026
Read two integers n and k. Toggle (flip) the k-th bit (0-based) of n and output the new number....
3 views
24 Jan 2026
Four integers a b c d are provided. Compute (a+b)*c - d and output it....
2 views
24 Jan 2026
Read three integers a b c. Compute a + b*c and a*b + c. Output both in one line....
2 views
24 Jan 2026
Integers a b m are provided. Output (a^b) % m. Use fast power (pow with mod)....
3 views
24 Jan 2026
Read two non-negative integers n and k. Output 1 if k-th bit (0-based) of n is set, else 0....
3 views
24 Jan 2026
One non-negative integer n is provided. Count how many 1 bits are in binary representation and output it....
7 views
24 Jan 2026
One non-negative integer n is provided (n>0). Remove the rightmost set bit once and output the new number....
4 views
24 Jan 2026
Read two integers a and b. Output YES if they have opposite signs (one negative, one positive). If any is zero, output NO....
3 views
24 Jan 2026
Read n-1 numbers from 1..n (one is missing). Compute the missing number using XOR....
2 views
24 Jan 2026
Read two non-negative integers a and b. Hamming distance is number of different bits. Output it....
3 views
24 Jan 2026
Read two integers x and k. Output x * (2^k) using shift operator....
3 views
24 Jan 2026
Input has two integers x and k are provided (k>=0). Output floor(x / (2^k)) using right shift (for non-negative x)....
3 views
24 Jan 2026
Read two integers x and r. Treat x as unsigned 32-bit. Rotate left by r and output the unsigned result....
3 views
24 Jan 2026
Read two integers a and b. Add them without using + or -. Use bit operations and output sum....
2 views
24 Jan 2026
Read one integer n. In one move you can add 1 or subtract 1. Output minimum moves needed to make n even....
2 views
24 Jan 2026
Input has two integers p and q are provided (q != 0). Reduce the fraction p/q and output as p q (reduced). Keep denominator positive....
4 views
24 Jan 2026
Read n and then k indices (0-based). Build a bitmask with those bits set and output it as integer....
3 views
24 Jan 2026
One non-negative integer n is provided (n>0). Compute the smallest integer > n that has the same number of set bits. Output it....
3 views
24 Jan 2026
Read three non-negative integers a b c. In one flip you can change one bit of a or b. Compute minimum flips needed so that (a | b) == c....
2 views
24 Jan 2026
Read n integers, total Hamming distance is sum of distances over all pairs (i...
5 views
24 Jan 2026
Read n integers, find maximum value of ai ^ aj over all pairs. Output the maximum XOR....
3 views
24 Jan 2026
Integers a and m are provided, and exponent b is provided as a very large decimal string. Output (a^b) % m....
3 views
24 Jan 2026
Read n numbers, consider all subsets. For each subset take XOR of its elements. Output the sum of XOR over all subsets....
3 views
24 Jan 2026
Read array of n integers and q queries (l r). For each query output XOR of a[l..r] (1-based)....
3 views
24 Jan 2026
Read n integers and q queries (l r). For each query output bitwise AND of a[l..r] (1-based)....
3 views
24 Jan 2026
A boolean string s of 0/1 and a boolean string t of 0/1 are provided, same length. Treat them as bits and compute (s XOR t) as a new string. Output it....