10878

//============================================================================
// Name        : 10878.cpp
// Author      : 
// Version     :
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================

#include <iostream>
#include <cstdio>
using namespace std;


int t, ans;
char s[100];


int main() {
	freopen("a.txt", "r", stdin);
	while(gets(s)){
		if(s[0] == '|'){
			t = 1;
			ans = 0;
			for(int i = 9;i >= 2;i--){
				if(s[i] == 'o'||s[i] == ' '){
					if(s[i] == 'o'){
						ans += t;
					}
					t = t << 1;
				}
			}
			printf("%c", ans);
		}
	}
	return 0;
}
posted @ 2011-06-12 18:37  KOKO's  阅读(304)  评论(0编辑  收藏  举报