• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            uva :: Programming Challenges :: Chapter 1 :: 706 - LCD Display

              1 /* 
              2  * File:   706.cpp
              3  * Author: GongZhi
              4  * Problem: http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=29&page=show_problem&problem=647
              5  * Created on 2009年7月25日, 下午10:08
              6  */
              7 
              8 #include <stdlib.h>
              9 #include <string.h>
             10 #include <iostream>
             11 #include <string>
             12 #include <vector>
             13 #include <map>
             14 #include <queue>
             15 using namespace std;
             16 
             17 /*
             18  *
             19  */
             20 
             21 //下面為0~9字符表示
             22 int P[10][7= {
             23     {1110111},
             24     {0010010},
             25     {1011101},
             26     {1011011},
             27     {0111010},
             28     {1101011},
             29     {1101111},
             30     {1010010},
             31     {1111111},
             32     {1111011}
             33 };
             34 
             35 int main() {
             36     int s, i, j, l, k;
             37     char n[100];
             38     while (scanf("%d%s"&s, n), s) {
             39         l = strlen(n);
             40         for (i = 0; i < l; i++)n[i] -= '0';
             41         //0
             42         for (i = 0; i < l; i++) {
             43             if (i != 0)printf(" ");
             44             printf(" ");
             45             for (j = 0; j < s; j++)
             46                 if (P[n[i]][0])printf("-");
             47                 else printf(" ");
             48             printf(" ");
             49         }
             50         printf("\n");
             51         //1&2
             52         for (k = 0; k < s; k++) {
             53             for (i = 0; i < l; i++) {
             54                 if (i != 0)printf(" ");
             55                 if (P[n[i]][1])printf("|");
             56                 else printf(" ");
             57                 for (j = 0; j < s; j++)printf(" ");
             58                 if (P[n[i]][2])printf("|");
             59                 else printf(" ");
             60             }
             61             printf("\n");
             62         }
             63         //3
             64         for (i = 0; i < l; i++) {
             65             if (i != 0)printf(" ");
             66             printf(" ");
             67             for (j = 0; j < s; j++)
             68                 if (P[n[i]][3])printf("-");
             69                 else printf(" ");
             70             printf(" ");
             71         }
             72         printf("\n");
             73         //4&5
             74         for (k = 0; k < s; k++) {
             75             for (i = 0; i < l; i++) {
             76                 if (i != 0)printf(" ");
             77                 if (P[n[i]][4])printf("|");
             78                 else printf(" ");
             79                 for (j = 0; j < s; j++)printf(" ");
             80                 if (P[n[i]][5])printf("|");
             81                 else printf(" ");
             82             }
             83             printf("\n");
             84         }
             85         //6
             86         for (i = 0; i < l; i++) {
             87             if (i != 0)printf(" ");
             88             printf(" ");
             89             for (j = 0; j < s; j++)
             90                 if (P[n[i]][6])printf("-");
             91                 else printf(" ");
             92             printf(" ");
             93         }
             94         printf("\n");
             95         //因為沒加下面這個居然wa了一次
             96         printf("\n");
             97     }
             98 
             99     return 0;
            100 }
            101 
            102 

            posted on 2009-07-25 22:35 gong 閱讀(892) 評論(0)  編輯 收藏 引用

            <2008年7月>
            293012345
            6789101112
            13141516171819
            20212223242526
            272829303112
            3456789

            導航

            統計

            常用鏈接

            留言簿(6)

            隨筆檔案

            搜索

            積分與排名

            最新評論

            閱讀排行榜

            評論排行榜

            婷婷久久综合| 色综合色天天久久婷婷基地| 国产精品免费看久久久香蕉| 日韩人妻无码一区二区三区久久 | 午夜精品久久久久9999高清| 久久精品国产乱子伦| 久久久精品久久久久久| 一本色道久久88加勒比—综合| 久久国产成人午夜AV影院| 久久免费国产精品| 狠狠综合久久综合88亚洲| 少妇内射兰兰久久| 99久久99久久| 久久久久亚洲精品男人的天堂| 亚洲精品国产第一综合99久久| 精品久久一区二区三区| 久久天天躁夜夜躁狠狠躁2022| 狠狠人妻久久久久久综合蜜桃| 久久人人爽人人爽人人片AV不| 国产999精品久久久久久| 国产精品久久久久国产A级| 久久久受www免费人成| 亚洲狠狠综合久久| 国产成人久久AV免费| 久久精品国产免费观看三人同眠| 国产成人无码精品久久久免费| 热re99久久精品国99热| 亚洲国产精品无码成人片久久| 久久久一本精品99久久精品88| 久久久精品国产Sm最大网站| 久久精品无码免费不卡| 亚洲国产精品人久久| 女人香蕉久久**毛片精品| 久久精品国产亚洲77777| 亚洲综合日韩久久成人AV| 久久狠狠爱亚洲综合影院 | 国产精品久久一区二区三区| 99久久免费国产精品特黄| 亚洲国产精品嫩草影院久久| 久久www免费人成看国产片| 国产精品综合久久第一页|