|
|||||||||||||||||||
|
SPOJ time: 2012-05-25 02:32:20 |
Linear Feedback Shift RegisterProblem code: HS11LFSR
Given a Fibonacci linear feedback shift register (LFSR) please emulate its behaviour. InputFirst t<100, the number of test cases. In each of the following t lines: OutputPlease output, byte by byte, the first 128 output bits of the register in hexadecimal format. ExampleInput: 2 3 010 2 2 3 5 00110 3 1 3 5 Output: A7 D3 E9 74 3A 9D 4E A7 D3 E9 74 3A 9D 4E A7 D3 85 9B C2 4D E1 A6 70 53 B8 29 DC 14 6E 0A 37 85 ScoringBy solving this problem you score 10 points.
|
||||||||||||||||||
| |||||||||||||||||||