//poj 2105
//2013-05-01-21.10
#include <stdio.h>
char s[34];
int a[8] = {128, 64, 32, 16, 8, 4, 2, 1};
int main()
{
int n;
scanf("%d", &n);
while (n--)
{
scanf("%s", s);
int ans = 0;
int f = 1;
for (int i = 0; i < 32; i++)
{
if (s[i] == '1')
ans += a[i%8];
if ((i+1) % 8 == 0)
{
if (f)
{
f = 0;
printf("%d", ans);
}
else
printf(".%d", ans);
ans = 0;
}
}
puts("");
}
return 0;
}



![[翻译]我在谷歌14年学到的21堂课-XINDOO](https://xindoo-1254046096.cos.ap-beijing.myqcloud.com/img/uPic/iShot_2026-01-21_下午11.21.45fewv0C.jpg)


