zoukankan      html  css  js  c++  java
  • 水题 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:
    ", ++cas);
    28         printf ("*------------*
    ");
    29         for (int i=1; i<=10-x; ++i)
    30         {
    31             printf ("|............|
    ");
    32         }
    33         for (int i=1; i<=x; ++i)
    34         {
    35             printf ("|------------|
    ");
    36         }
    37         printf ("*------------*
    ");
    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 */
    编译人生,运行世界!
  • 相关阅读:
    Cogs 465. 挤牛奶
    洛谷P1083 借教室
    Cogs 1264. [NOIP2012] 开车旅行(70分 暴力)
    2017-10-19 NOIP模拟赛
    Codevs 2144 砝码称重 2
    洛谷P1450 [HAOI2008]硬币购物
    洛谷P2534 [AHOI2012]铁盘整理
    洛谷P1731 生日蛋糕
    2017-10-18 NOIP模拟赛
    洛谷P1074 靶形数独
  • 原文地址:https://www.cnblogs.com/Running-Time/p/4439777.html
Copyright © 2011-2022 走看看