• <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 閱讀(898) 評論(0)  編輯 收藏 引用

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

            導航

            統計

            常用鏈接

            留言簿(6)

            隨筆檔案

            搜索

            積分與排名

            最新評論

            閱讀排行榜

            評論排行榜

            99久久国产综合精品网成人影院 | AA级片免费看视频久久| 国产91色综合久久免费| 久久丝袜精品中文字幕| 久久久久AV综合网成人| 很黄很污的网站久久mimi色| 97久久婷婷五月综合色d啪蜜芽| 狠狠色噜噜狠狠狠狠狠色综合久久| 大香网伊人久久综合网2020| 99久久这里只精品国产免费| 99久久精品国产免看国产一区| 久久精品一区二区影院| 一本色综合网久久| 狠狠精品久久久无码中文字幕| 少妇精品久久久一区二区三区| 久久久久久国产精品免费免费| 亚洲国产精品无码久久久秋霞2 | 久久性生大片免费观看性| 久久综合亚洲欧美成人| 久久久噜噜噜久久中文字幕色伊伊| 国产精品久久久久免费a∨| 精品久久久久久国产免费了| 国产成人精品久久免费动漫| 久久99精品国产自在现线小黄鸭| 亚洲人成无码www久久久| 久久www免费人成看国产片| 久久99国产亚洲高清观看首页 | 亚洲AV日韩精品久久久久| 狠狠色丁香婷婷久久综合五月| 91精品国产91久久久久久| 久久免费精品一区二区| a高清免费毛片久久| 2021少妇久久久久久久久久| 久久66热人妻偷产精品9| 人妻少妇久久中文字幕| 久久人妻AV中文字幕| 欧美日韩久久中文字幕| 99久久做夜夜爱天天做精品| 日本WV一本一道久久香蕉| 国产免费久久精品99re丫y| 狠狠综合久久AV一区二区三区|