Fast Multiplication
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
Given two numbers, a and b, your task is to compute the value of x = (36 * a + b div 16) mod 32 using only bitwise operations, addition, and subtraction.
Input
The input consists of two integers separated by a space, where 0 ≤ a, b ≤ 10^6.
Output
The output should be a single integer representing the value of x = (36 * a + b div 16) mod 32.
Examples
Input #1
Answer #1
Submissions 722
Acceptance rate 81%