#include <iostream>
#include <cstdio>
#include <cstring>
char buff[100];
int main()
{
#ifndef ONLINE_JUDGE
freopen("in.txt", "r", stdin);
#endif
char *p;
int sys;
char letter;
while(fgets(buff, sizeof(buff), stdin)){
if((p = strchr(buff, '|')) == NULL) continue;
p++;
sys = 128;
letter = 0;
while(*p != '|') {
switch(*p) {
case 'o':
letter += sys;
case ' ':
sys /= 2; break;
}
p++;
}
putchar(letter);
}
return 0;
}
UVa 10878 - Decode the tape
最新推荐文章于 2016-07-18 15:03:58 发布