这题看了好久的题目,,对于我这种菜鸟来说,新颖到不能理解,大眼瞪小眼地看了十几分钟题,忍不了了看报告吧,,,我想说这也叫题吗,,一点解释都不给,,你赢了!
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<iostream>
#include<algorithm>
using namespace std;
#define MAXN 15
int asc[11] = {0, 0, 64, 32, 16, 8, 0, 4, 2, 1};
int main()
{
char tape[MAXN];
while(gets(tape))
{
int temp = 0;
if(tape[0] != '|') continue;
for(int i=2; i<10; i++)
if(tape[i] == 'o')
temp += asc[i];
printf("%c",temp);
}
return 0;
}