Complementary code - 1
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
Given numbers a and n, print the representation of a in n-bit binary complement code.
Print a line with n digits containing the representation of number a in n-bit binary complement code, where the first digit is the highest bit.
Input
In one line given two numbers a and n (2 ≤ n ≤ 16, -2^(n-1)
≤ a ≤ 2^(n-1)-1
).
Output
Print the number in n-bit complement code.
Examples
Input #1
Answer #1
Input #2
Answer #2
Submissions 2K
Acceptance rate 44%