uva 10878 - Decode the tape 字符串水题 找到规律就简单了
2013-08-02 09:24
369 查看
#include<cstdio> #include<cstring> int main() { #ifdef LOCAL freopen("in.txt","r",stdin); #endif // LOCAL char x[15] = "___________"; char str[15]; int d[11] = {0,0,64,32,16,8,0,4,2,1,0}; int t = 0; while(t < 2) { gets(str); if(strcmp(str,x)==0){t++;continue;} int sum = 0; for(int i = 2;str[i]!='\0'; i++) if(str[i] == 'o')sum += d[i]; printf("%c",sum); } return 0; }
相关文章推荐
- 2018-1-23洛谷新手村 ——简单字符串(水题)
- UVA 10878(字符串)
- POJ 1002 UVA 755 487--3279 电话排序 简单但不容易的水题
- POJ 1002 UVA 755 487--3279 电话排序 简单但不容易的水题
- UVA 10878 (暑假-字符串(2) -C - Decode the tape)
- UVa 725 简单枚举+整数转换为字符串
- UVa10878 - Decode the tape-字符串-难度1
- Automatic Poetry - UVa 10361 简单字符串处理
- UVa 725 简单枚举+整数转换为字符串
- UVALive 4764 简单dp水题(也可以暴力求解)
- UVALive 2052 Number Steps【简单模拟】水题
- UVA484水题判断字符串中单词数目
- UVA 401(palindorme)简单字符串处理
- HDU 2672 god is a girl (字符串处理,找规律,简单)
- 字符串水题(substr的使用+简单优化)
- 一个简单的批处理(获取返回字符串并比较,找到指定字符串后退出)
- hdu 1062 Text Reverse 字符串处理。简单水题
- UVaLive 6847 Zeroes (找规律,水题)
- uva 10361 - Automatic Poetry (简单字符串)
- UVA - 1368 DNA Consensus String :简单字符串处理