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. 在VirtualBox上安装Ubuntu

    Windows 10家庭中文版,VirtualBox 5.2.12 r122591,Ubuntu ubuntu-18.04-desktop, 前言 很久没用过Linux类的操作系统了,上一次是好多年前 ...

  2. Centos6.5安装步骤(U盘安装)

    https://blog.csdn.net/hochoy/article/details/80697454

  3. python的简介(一)

    1. Python的种类 Cpython     Python的官方版本,使用C语言实现,使用最为广泛,CPython实现会将源文件(py文件)转换成字节码文件(pyc文件),然后运行在Python虚 ...

  4. Bechmarksql

    使用方法 1.配置JDK环境 JDK最好是1.5以上的版本 JAVA_HOME=/usr/java/jdk1.6.0_22 PATH=$PATH:$JAVA_HOME/bin 2.准备工作 把要测试的 ...

  5. mysql 解除正在死锁的状态

    转自:http://blog.csdn.net/hotdust/article/details/51524469 from: http://www.2cto.com/database/201303/1 ...

  6. 实现Ecshop注册页面手机号唯一的验证

    如果Ecshop实现了用手机号码来登陆,那么就需要在注册时保证会员所填写的手机号是唯一的,也就是说手机号还未被注册,那么该怎么来检测填写的手机号是否注册过了呢? 一.参考ecshop检测邮箱 因为注册 ...

  7. ubuntu 安装 theano

    参考博客: http://www.cnblogs.com/anyview/p/5025704.html 1. 安装gfortran, numpy, scipy, sklearn, blas, atla ...

  8. ThinkPHP join() table()方法的使用,多表查询

    ThinkPHP模型类​比较常用的两个方法,table() join() table 1 $list = M()->table('user1 a, user2 b')->where('a. ...

  9. webview内部跳转判断

    重写webview内的方法 webView.setWebViewClient(new WebViewClient() { @Override // 在点击请求的是链接是才会调用,重写此方法返回true ...

  10. Android中selector背景选择器

    http://blog.csdn.net/forsta/article/details/26148403 http://blog.csdn.net/wswqiang/article/details/6 ...