4-LSB
Time limit1sMemory limit1024 MB
Given three integers, take the lowest 4 bits of each, join them in order into a 12-bit number, and print it in decimal as a 4-digit password.
- Level
Easy2 of 10
- Topics
- Bit manipulation, Implementation
- Solved
- No attempts yet
문제
Steganography is a data hiding technique that conceals data by inserting it into other data. k-Least Significant Bit (k-LSB), a method commonly used in steganography, refers to the lowest k bits of a value. It hides data by replacing the lowest k bits of the plaintext data with the data to be transmitted. For example, to hide 7 (binary: 111) in 100 (binary: 1100100) using 3-LSB, the lowest 3 bits are replaced with the value for 7 (binary: 111), giving 103 (binary: 1100111).
Eungyu urgently needs the restroom but does not know the password, so he asks Cheok. To tease Eungyu, Cheok decides to hide the password using 4-LSB. Cheok gives Eungyu three decimal numbers. Write the 4-LSB of each number in binary, concatenate them in order, and convert the result back to decimal. That value is the restroom password. The password is always 4 digits. If the derived password has fewer than 4 digits, add one or more leading zeros to make it 4 digits.
입력
The first line through the third line each contain one of the three decimal numbers Cheok gives, in order. Each number is an integer from to , inclusive.
출력
Print the 4-digit restroom password on the first line.