|시간 제한||메모리 제한||제출||정답||맞은 사람||정답 비율|
|5 초||512 MB||5||5||2||100.000%|
I have written down a large perfect square in binary, and then replaced some of the digits with question marks. Can you figure out what my original number was?
The first line of the input gives the number of test cases, T. T test cases follow, one per line. Each line contains S: a perfect square written in binary, but with some of the digits replaced by question marks.
For each test case, output one line containing "Case #x: N", where x is the case number (starting from 1) and N is a perfect square written in binary, obtained by replacing each '?' character in S with either a '0' character or a '1' character.
3 1??? 1 10??110??00??1000??
Case #1: 1001 Case #2: 1 Case #3: 1011110110000100001