A Computer Graphics Problem

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 43    Accepted Submission(s): 40

Problem Description
In this problem we talk about the study of Computer Graphics. Of course, this is very, very hard.
We have designed a new mobile phone, your task is to write a interface to display battery powers.
Here we use '.' as empty grids.
When the battery is empty, the interface will look like this:

*------------*
|............|
|............|
|............|
|............|
|............|
|............|
|............|
|............|
|............|
|............|
*------------*

When the battery is 60% full, the interface will look like this:

*------------*
|............|
|............|
|............|
|............|
|------------|
|------------|
|------------|
|------------|
|------------|
|------------|
*------------*

Each line there are 14 characters.
Given the battery power the mobile phone left, say x%, your task is to output the corresponding interface. Here x will always be a multiple of 10, and never exceeds 100.

 
Input
The first line has a number T (T < 10) , indicating the number of test cases.
For each test case there is a single line with a number x. (0 < x < 100, x is a multiple of 10)
 
Output
For test case X, output "Case #X:" at the first line. Then output the corresponding interface.
See sample output for more details.
 
Sample Input
2
0
60
 
Sample Output
Case #1:
*------------*
|............|
|............|
|............|
|............|
|............|
|............|
|............|
|............|
|............|
|............|
*------------*
Case #2:
*------------*
|............|
|............|
|............|
|............|
|------------|
|------------|
|------------|
|------------|
|------------|
|------------|
*------------*
 
Source
 
Recommend
zhuyuanchen520
 

大水题一发

就是拼手速

 /* ***********************************************
Author :kuangbin
Created Time :2013-9-11 12:01:07
File Name :2013-9-11\1001.cpp
************************************************ */ #include <stdio.h>
#include <string.h>
#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <string>
#include <math.h>
#include <stdlib.h>
#include <time.h>
using namespace std;
int main()
{
//freopen("in.txt","r",stdin);
//freopen("out.txt","w",stdout);
int iCase = ;
int T;
int n;
scanf("%d",&T);
while(T--)
{
iCase++;
printf("Case #%d:\n",iCase);
scanf("%d",&n);
printf("*");
for(int i = ;i < ;i++)printf("-");
printf("*\n");
int t = n/;
for(int i = ;i < -t;i++)
{
printf("|");
for(int j = ;j < ;j++)printf(".");
printf("|\n");
}
for(int i = ;i < t;i++)
{
printf("|");
for(int j = ;j < ;j++)printf("-");
printf("|\n");
}
printf("*");
for(int i = ;i < ;i++)printf("-");
printf("*\n"); }
return ;
}

HDU 4716 A Computer Graphics Problem (水题)的更多相关文章

  1. HDU 4716 A Computer Graphics Problem

    A Computer Graphics Problem Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (J ...

  2. HDU 4716 A Computer Graphics Problem 2013年四川省赛题

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4716 题目大意不用解释了吧,看案例就能明白 #include<cstdio> #inclu ...

  3. HDU-4716 A Computer Graphics Problem 水题

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4716 直接搞.. //STATUS:C++_AC_0MS_288KB #include <fun ...

  4. 水题 HDOJ 4716 A Computer Graphics Problem

    题目传送门 /* 水题:看见x是十的倍数就简单了 */ #include <cstdio> #include <iostream> #include <algorithm ...

  5. HDU 5170 GTY's math problem 水题

    题目链接: hdu:http://acm.hdu.edu.cn/showproblem.php?pid=5170 bc(中文):http://bestcoder.hdu.edu.cn/contests ...

  6. HDUOJ----A Computer Graphics Problem

    A Computer Graphics Problem Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (J ...

  7. HDU 2096 小明A+B --- 水题

    HDU 2096 /* HDU 2096 小明A+B --- 水题 */ #include <cstdio> int main() { #ifdef _LOCAL freopen(&quo ...

  8. hdu 2117:Just a Numble(水题,模拟除法运算)

    Just a Numble Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Tot ...

  9. hdu 2050:折线分割平面(水题,递归)

    折线分割平面 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Subm ...

随机推荐

  1. ipad webapp禁止长按选择

    1.禁止长按屏幕弹出对话框并选中文字 /*禁止长按选择文字事件*/ * { -webkit-touch-callout: none; -webkit-user-select: none; -khtml ...

  2. TObject、TPersisent 、TComponent、TControl、TGraphicControl、TWinControl 关系图

    VCL的类图结构               TObject                 |               TPersisent                 |         ...

  3. delphi TComponent类(1)

    来自:http://blog.csdn.net/lailai186/article/details/7442383 ------------------------------------------ ...

  4. LeetCode517. Super Washing Machines

    You have n super washing machines on a line. Initially, each washing machine has some dresses or is ...

  5. 20165203《Java程序设计》第四周学习总结

    教材学习内容总结 第5章 子类与继承 子类的继承性 子类和父类在同一包中的继承性:子类继承父类中不是private的成员变量和方法作为自己的成员变量和方法 子类和父类不在同一包中的继承性:子类只继承父 ...

  6. Java流(Stream)、Scanner类

    读取控制台输入 Java 的控制台输入由 System.in 完成. 为了获得一个绑定到控制台的字符流,你可以把 System.in 包装在一个 BufferedReader 对象中来创建一个字符流. ...

  7. 如何适配处理iphoneX底部的横条 - ios

    iphoneX手机取消了实体Home键,取而代之的是主界面底部不显眼的横条“Home Indicator”.当网页底部fixed 元素时候,一部分元素可能就被这个横条遮挡住,怎么适配解决呢? 第一步: ...

  8. 微信公众号开发--用.Net Core实现微信消息加解密

    1.进入微信公众号后台设置微信服务器配置参数(注意:Token和EncodingAESKey必须和微信服务器验证参数保持一致,不然验证不会通过). 2.设置为安全模式 3.代码实现(主要分为验证接口和 ...

  9. 富文本是在modal框中弹出显示的问题

    记录一下,在用tinymce富文本的时候,由于是用在modal 上的,始终无法获取焦点,后来才发现问题出在tinymce在modal前创建了,所以导致这个问题,解决方案就是用 v-if="v ...

  10. PHP经典算法百钱买小鸡

    遇到一道有趣的题,并计算2种方法的效率,发现如果穷举所有组合竟高达1000000次排列~所以简化到了600次.所以,你的一个条件,或者一个运算,可能会提高几千倍的效率! <?php header ...