POJ 2105 题解(gcc) - 哆啦比猫的技术瞎扯 - Arch Linux · ドラえもん · 实时绘制
POJ 2105 题解(gcc)
http://poj.org/problem?id=2105
#include <stdio.h>
int main(void)
{
int n;
scanf("%d", &n);
int ch;
while (n--) {
while ((ch = getchar()) == '\n' || ch == '\r' || ch == ' ') {}
ungetc(ch, stdin);
char i, j;
int res;
for (j=0; j<4; j++) {
res = 0;
for (i=7; i>=0; i--)
res += (getchar()-'0') << i;
printf("%d%c", res, (j==3?'\n':'.'));
}
}
return 0;
}
凡未特殊声明(转载/翻译),所有文章均为原创。
by Giumo Xavier Clanjor (哆啦比猫/兰威举), 2010-2019.
本作品采用知识共享署名·非商业性使用·相同方式共享 3.0 中国大陆许可协议进行许可。
文中凡未特殊声明且未声明为引用的代码均以 MIT 协议授权。
blog comments powered by Disqus