每行对应字符的ASC码
#include <stdio.h>
#include <string.h>
#define N 20
const int exp[11] = {0, 128, 64, 32, 16, 8, 0, 4, 2, 1};
int main()
{
//freopen("out.txt", "w", stdout);
char data[N];
while(gets(data))
{
int sum = 0;
int l = strlen(data);
if(data[0] != '|') continue;
for(int i = 1; i < l - 1; i++)
{
if(data[i] == '.') continue;
if(data[i] == 'o') sum += exp[i];
}
printf("%c", sum);
}
return 0;
}