首页 > 其他 > 详细

水题 HDOJ 4716 A Computer Graphics Problem

时间:2015-04-19 21:15:44      阅读:218      评论:0      收藏:0      [点我收藏+]

 

题目传送门

 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 */

 

水题 HDOJ 4716 A Computer Graphics Problem

原文:http://www.cnblogs.com/Running-Time/p/4439777.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!