水题 HDOJ 4716 A Computer Graphics Problem

 

题目传送门

 1 /*
 2     水题:看见x是十的倍数就简单了
 3 */
 4 #include <cstdio>
 5 #include <iostream>
 6 #include <algorithm>
 7 #include <cstring>
 8 #include <string>
 9 #include <cmath>
10 using namespace std;
11 
12 const int MAXN = 1e4 + 10;
13 const int INF = 0x3f3f3f3f;
14 
15 int main(void)        //HDOJ 4716 A Computer Graphics Problem
16 {
17     //freopen ("A.in", "r", stdin);
18 
19     int t, cas = 0;
20     scanf ("%d", &t);
21     while (t--)
22     {
23         int x;
24         scanf ("%d", &x);
25         x /= 10;
26 
27         printf ("Case #%d:\n", ++cas);
28         printf ("*------------*\n");
29         for (int i=1; i<=10-x; ++i)
30         {
31             printf ("|............|\n");
32         }
33         for (int i=1; i<=x; ++i)
34         {
35             printf ("|------------|\n");
36         }
37         printf ("*------------*\n");
38     }
39 
40     return 0;
41 }
42 
43 /*
44  Case #1:
45 *------------*
46 |............|
47 |............|
48 |............|
49 |............|
50 |............|
51 |............|
52 |............|
53 |............|
54 |............|
55 |............|
56 *------------*
57 Case #2:
58 *------------*
59 |............|
60 |............|
61 |............|
62 |............|
63 |------------|
64 |------------|
65 |------------|
66 |------------|
67 |------------|
68 |------------|
69 *------------*
70 */

 

posted @ 2015-04-19 20:23  Running_Time  阅读(137)  评论(0编辑  收藏  举报