Decode the tape - UVa 10878 找规律
来源:互联网 发布:qq农场刷级软件 编辑:程序博客网 时间:2024/04/29 14:31
Decode the tape
Time Limit: 1 second
Alan Turing
Your boss has just unearthed a roll of old computer tapes. The tapes have holes in them and might contain some sort of useful information. It falls to you to figure out what is written on them.
Input
The input will contain one tape.
Output
Output the message that is written on the tape.
___________| o . o|| o . || ooo . o|| ooo .o o|| oo o. o|| oo . oo|| oo o. oo|| o . || oo . o || ooo . o || oo o.ooo|| ooo .ooo|| oo o.oo || o . || oo .oo || oo o.ooo|| oooo. || o . || oo o. o || ooo .o o|| oo o.o o|| ooo . || ooo . oo|| o . || oo o.ooo|| ooo .oo || oo .o o|| ooo . o || o . || ooo .o || oo o. || oo .o o|| o . || oo o.o || oo . o|| oooo. o || oooo. o|| o . || oo .o || oo o.ooo|| oo .ooo|| o o.oo || o. o |___________
A quick brown fox jumps over the lazy dog.
题意:解码。
思路:7位的二进制。
AC代码如下:
#include<cstdio>#include<cstring>using namespace std;char str[100];int main(){ gets(str); while(true) { gets(str); if(str[2]=='_') break; else { int k=0; if(str[9]=='o') k+=1; if(str[8]=='o') k+=2; if(str[7]=='o') k+=4; if(str[5]=='o') k+=8; if(str[4]=='o') k+=16; if(str[3]=='o') k+=32; if(str[2]=='o') k+=64; printf("%c",k); } }}
0 0
- Decode the tape - UVa 10878 找规律
- UVa 10878 - Decode the tape
- uva 10878 Decode the tape
- uva-10878 - Decode the tape
- uva 10878 - Decode the tape
- UVa 10878 - Decode the tape
- Uva - 10878 - Decode the tape
- UVA 10878 - Decode the tape
- UVa 10878 - Decode the tape
- UVA 10878 - Decode the tape
- UVA 10878 Decode the tape
- UVa - 10878 - Decode the tape
- UVA 10878 Decode the tape
- uva 10878 Decode the tape
- UVa 10878 - Decode the tape
- uva 10878 decode the tape
- uva - 10878 - Decode the tape
- uva 10878 Decode the tape
- 5月31日互联网理财产品收益播报:余额宝再跌
- 交错数组
- 怀念,那淅沥的雨
- Linux 文本界面与图形界面互相切换
- 有关 腾讯iOS手游
- Decode the tape - UVa 10878 找规律
- ExtJs学习笔记(1)---ExtJs安装及其使用
- 一个程序员的拧巴阶段(一)
- 如何在ubuntu下查看隐藏的文件和文件夹
- C# Interlocked类的事例
- python版的短信轰炸机smsbomb----------下篇(get)
- Codeforces Round #249 (Div. 2) A B C
- 机房收费系统——可行性分析报告
- LeetCode 解题