您的位置:首页 > 其它

水题 HDOJ 4716 A Computer Graphics Problem

2015-04-19 20:23 375 查看
题目传送门

 /*
水题:看见x是十的倍数就简单了
*/
#include <cstdio>
#include <iostream>
#include <algorithm>
#include <cstring>
#include <string>
#include <cmath>
using namespace std;

const int MAXN = 1e4 + 10;
const int INF = 0x3f3f3f3f;

int main(void)        //HDOJ 4716 A Computer Graphics Problem
{
//freopen ("A.in", "r", stdin);

int t, cas = 0;
scanf ("%d", &t);
while (t--)
{
int x;
scanf ("%d", &x);
x /= 10;

printf ("Case #%d:\n", ++cas);
printf ("*------------*\n");
for (int i=1; i<=10-x; ++i)
{
printf ("|............|\n");
}
for (int i=1; i<=x; ++i)
{
printf ("|------------|\n");
}
printf ("*------------*\n");
}

return 0;
}

/*
Case #1:
*------------*
|............|
|............|
|............|
|............|
|............|
|............|
|............|
|............|
|............|
|............|
*------------*
Case #2:
*------------*
|............|
|............|
|............|
|............|
|------------|
|------------|
|------------|
|------------|
|------------|
|------------|
*------------*
*/
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: