Uva 445 Marvelous Mazes

原创 2012年03月29日 16:04:52
#include<stdio.h>
#include<ctype.h>
#include<string.h>
int main()
{
	int count=0;
	char ch;
	while(scanf("%c",&ch)!=EOF)
	{
		if(isdigit(ch))
			count += ch - '0';			
		else if((isalpha(ch) && ch != 'b') || ch=='*')
		{
			while(count--)
				printf("%c",ch);
			count = 0;
		}
		else if(ch=='b')
		{
			while(count--)
				printf(" ");
			count = 0;
		}
		else if(ch=='!' || ch =='\n')
		{				
			printf("\n");
			count = 0;
		}

	}
	return 0;
}


相关文章推荐

UVa 445 Marvelous Mazes(非凡的迷宫)

Marvelous Mazes  Your mission, if you decide to accept it, is to create a maze drawing program...

UVA oj 445 Marvelous Mazes(水题字符串)

Marvelous Mazes Time Limit: 3000MS   Memory Limit: Unknown   64bit IO Format: %lld & %l...
  • Sara_YF
  • Sara_YF
  • 2016年06月02日 12:31
  • 145

UVa 445 Marvelous Mazes (water ver.)

445 - Marvelous Mazes Time limit: 3.000 seconds http://uva.onlinejudge.org/index.php?option=com_onli...

UVA 445 - Marvelous Mazes

题目链接:445 - Marvelous Mazes  Marvelous Mazes  Your mission, if you deci...

UVA, 445 Marvelous Mazes(根据输入的字符输出相应的矩阵)

Problem H : Marvelous Mazes From:UVA, 445 Marvelous Mazes Your mission,...

UVa - 445 - Marvelous Mazes(AC)

Your mission, if you decide to accept it, is to create a maze drawing program. A maze will consist o...

445 - Marvelous Mazes

Marvelous Mazes  Your mission, if you decide to accept it, is to create a mazedrawing pro...

Marvelous Mazes

http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=386  ...

Volume 0. Getting Started Uva10055, 10071,10300,458,494,490,414,445,488,489,694,457

刘汝佳 算法入门 第一版

[解题报告]《算法竞赛入门经典》基础题Volume 0. Getting Started Uva10055 Uva10071 Uva10300 Uva458 Uva494 Uva490 Uva445 Uva488 Uva489 Uva694 Uva457

我爱A水题...嘿嘿... UVA10055 - Hashmat the Brave Warrior入门题,注意数据类型为longlong即可ude #include using namespace ...
  • swm8023
  • swm8023
  • 2011年06月04日 11:38
  • 2931
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:Uva 445 Marvelous Mazes
举报原因:
原因补充:

(最多只允许输入30个字)