HDU 4716 A Computer Graphics Problem 解题报告

题目

题意:

模拟一个电池容量……

题解:

暴力


//Time:0ms
//Memory:288KB
//Length:498B
#include <iostream>
#include <cstdio>
#include <cstdlib>
using namespace std;
int main()
{
    //freopen("/home/moor/Code/input","r",stdin);
    int ncase,n;
    scanf("%d",&ncase);
    for(int hh=1;hh<=ncase;++hh)
    {
        printf("Case #%d:\n",hh);
        scanf("%d",&n);
        n/=10;
        printf("*------------*\n");
        for(int i=0;i<10-n;++i)     printf("|............|\n");
        for(int i=0;i<n;++i)    printf("|------------|\n");
        printf("*------------*\n");
    }
}


你可能感兴趣的:(HDU 4716 A Computer Graphics Problem 解题报告)