#include <stdio.h>
#include <string.h>
int main()
{
int value = 0, i = 0;
int c[] = {0, 0, 64, 32, 16, 8, 0, 4, 2, 1, 0};
char s[20];
gets(s);
while (gets(s) && s[0] != '_')
{
value = 0;
for (i = 2; i < strlen(s); i++)
{
if (s[i] == 'o')
value += c[i];
}
printf("%c", value);
}
return 0;
}
/*
本题目是考察ASCII码的相关内容。
*/
uva - 10878 - Decode the tape
最新推荐文章于 2021-07-28 17:29:11 发布