当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

3575:Digit Size

题目描述
Digital LC-display is widely used in many different fields such as electronic calculator, electronic watch, digital instruments, etc. A simulated example of the numbers represented by digital LC-display device is shown as follows:

Each number represented by LC-display above is composed of s "-" signs for the horizontal segments and s "|" signs for the vertical ones, and each number exactly occupies s+2 columns and 2s+3 rows. Your task is to change the size of the original numbers by changing "s" — the number of signs.
输入解释
The first line of input contains a number t, which means there are t cases of the test data.
The input contains several lines, 2s + 4 for each number to be displayed. The first line of each case contains two integer s and t (1 <= s, t <= 9), where s is the original size of the numbers and t is the target size of numbers that you should output. The following 2s + 3 lines show the original number n (the digit of n will not exceed 9) you should deal with. Each digit of n will be separated by an empty column (except for the last digit).
输出解释
For each test case, output the case number and then output the target number according to the input. Output a blank line after each case.
输入样例
2
2 5
      --   --        -- 
   |    |    | |  | |   
   |    |    | |  | |   
      --   --   --   -- 
   | |       |    |    |
   | |       |    |    |
      --   --        -- 
2 1
 --   --   --   --   -- 
|       | |  | |  | |  |
|       | |  | |  | |  |
 --        --   --      
|  |    | |  |    | |  |
|  |    | |  |    | |  |
 --        --   --   -- 
输出样例
Case 1:
         -----   -----           ----- 
      |       |       | |     | |      
      |       |       | |     | |      
      |       |       | |     | |      
      |       |       | |     | |      
      |       |       | |     | |      
         -----   -----   -----   ----- 
      | |             |       |       |
      | |             |       |       |
      | |             |       |       |
      | |             |       |       |
      | |             |       |       |
         -----   -----           ----- 

Case 2:
 -   -   -   -   - 
|     | | | | | | |
 -       -   -     
| |   | | |   | | |
 -       -   -   - 
来自杭电HDUOJ的附加信息
Author Totoro (Special Thanks mach)
Recommend zhouzeyong

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-3575

最后修改于 2020-10-25T23:04:54+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
6000/3000MS(Java/Others) 32768/32768K(Java/Others)