#include <iostream>
#include <cstdio>
#include <cstring>
using namespace std;
int main()
{
char str[20];
int i, key;
while( fgets(str, 20, stdin ) )
{
if( str[i] == '_' )
continue;
key = 0;
for( i = 1; i <= 9; i++ )
{
if( str[i] == 'o' )
{
switch( i )
{
case 1: key += 128; break;
case 2: key += 64; break;
case 3: key += 32; break;
case 4: key += 16; break;
case 5: key += 8; break;
case 7: key += 4; break;
case 8: key += 2; break;
case 9: key += 1; break;
}
}
}
if( key == 10 )
cout << endl;
else
printf( "%c", key );
}
return 0;
}
UVA 10878
最新推荐文章于 2016-07-25 22:06:51 发布