#include<stdio.h>
char s[64];
int main()
{
int i;
int sum, found;
while(gets(s))
{
int bit = 128;
i = sum = found = 0;
if(s[i] != '|')
continue;
for(;s[i];++i)
{
if(s[i]==' ')
bit>>= 1;
else if(s[i] == 'o')
{
sum += bit;
bit >>= 1;
}
}
printf("%c", sum);
}
return 0;
}
char s[64];
int main()
{
int i;
int sum, found;
while(gets(s))
{
int bit = 128;
i = sum = found = 0;
if(s[i] != '|')
continue;
for(;s[i];++i)
{
if(s[i]==' ')
bit>>= 1;
else if(s[i] == 'o')
{
sum += bit;
bit >>= 1;
}
}
printf("%c", sum);
}
return 0;
}
কোন মন্তব্য নেই:
একটি মন্তব্য পোস্ট করুন