题目大意:根据磁带上的内容进行翻印
解题思路:取下磁带的内容,再进行翻译
#include<cstdio>
#include<cstring>
#include<cmath>
int main() {
char s[100];
int len;
int number ;
int count ;
while(gets(s)) {
len = strlen(s);
number = 0;
count = 0;
if (s[0] == '_')
continue;
for(int i = len - 1; i >= 0; i--) {
if(s[i] == 'o')
number = number + (1<<count);
if(s[i] != '.' && s[i] != '|')
count++;
}
printf("%c", number);
}
return 0;
}