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

            <2009年7月>
            2829301234
            567891011
            12131415161718
            19202122232425
            2627282930311
            2345678

            導航

            統計

            常用鏈接

            留言簿(6)

            隨筆檔案

            搜索

            積分與排名

            最新評論

            閱讀排行榜

            評論排行榜

            精品一久久香蕉国产线看播放| 亚洲va国产va天堂va久久| 色成年激情久久综合| 亚洲国产精品久久久久| 女人高潮久久久叫人喷水| 97精品依人久久久大香线蕉97| 久久国产精品无码HDAV| 精品久久久久久99人妻| 久久久久人妻精品一区| 欧美精品丝袜久久久中文字幕 | 久久婷婷色综合一区二区| 久久精品水蜜桃av综合天堂| 久久午夜无码鲁丝片午夜精品| 久久精品亚洲一区二区三区浴池 | 久久精品天天中文字幕人妻| 久久国产香蕉一区精品| 久久久久亚洲AV无码麻豆| 中文精品久久久久人妻| 青青草原综合久久大伊人精品| 亚洲精品无码久久久影院相关影片| 99久久免费只有精品国产| 久久国产热精品波多野结衣AV| 国内精品伊人久久久影院| 国产精品午夜久久| 日本一区精品久久久久影院| 亚洲中文久久精品无码| 久久精品国产2020| 香港aa三级久久三级老师2021国产三级精品三级在 | 久久亚洲av无码精品浪潮| 情人伊人久久综合亚洲| 国产精品美女久久久久久2018| 一本一道久久综合狠狠老| 久久久高清免费视频| 九九精品久久久久久噜噜| 伊人久久大香线蕉无码麻豆| 人人狠狠综合久久亚洲| 久久天天躁狠狠躁夜夜2020| 久久精品国产WWW456C0M| 精品久久久无码中文字幕天天| 国产99久久久久久免费看| 97久久精品人人澡人人爽|