시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
5 초 | 512 MB | 123 | 80 | 67 | 69.792% |
A "0/1 string" is a string in which every character is either 0
or 1
. There are two operations that can be performed on a 0/1 string:
0
becomes 1
and every 1
becomes 0
. For example, "100" becomes "011".Consider this infinite sequence of 0/1 strings:
You need to figure out the Kth character of Sgoogol, where googol = 10100.
The first line of the input gives the number of test cases, T. Each of the next T lines contains a number K.
For each test case, output one line containing "Case #x: y", where x is the test case number (starting from 1) and y is the Kth character of Sgoogol.
4 1 2 3 10
Case #1: 0 Case #2: 0 Case #3: 1 Case #4: 0
Contest > Google > Google's Coding Competitions > Google APAC 2016 University Graduates Test > Round A APAC Test 2016 A1번
Contest > Google > Kick Start > Google Kick Start 2015 > Round A A1번