• <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         //因?yàn)闆]加下面這個(gè)居然wa了一次
             96         printf("\n");
             97     }
             98 
             99     return 0;
            100 }
            101 
            102 

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


            只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。
            網(wǎng)站導(dǎo)航: 博客園   IT新聞   BlogJava   博問   Chat2DB   管理


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

            導(dǎo)航

            統(tǒng)計(jì)

            常用鏈接

            留言簿(6)

            隨筆檔案

            搜索

            積分與排名

            最新評(píng)論

            閱讀排行榜

            評(píng)論排行榜

            亚洲va久久久久| 久久亚洲精品中文字幕| 国产成年无码久久久久毛片| 久久久SS麻豆欧美国产日韩| 77777亚洲午夜久久多喷| 亚洲日本va中文字幕久久| 日本强好片久久久久久AAA| 无码人妻久久一区二区三区| 久久精品国产亚洲77777| 久久久精品国产sm调教网站 | 久久婷婷五月综合国产尤物app| 囯产极品美女高潮无套久久久| 偷偷做久久久久网站| 久久青青草原精品国产| 久久香蕉一级毛片| 久久精品国产精品亚洲| 久久天天躁夜夜躁狠狠躁2022 | 国产叼嘿久久精品久久| 久久久人妻精品无码一区 | 久久国产成人午夜AV影院| 欧美日韩成人精品久久久免费看 | 久久久久高潮毛片免费全部播放| 99久久精品国产高清一区二区| 久久九九亚洲精品| 人人狠狠综合久久亚洲高清| 久久国产亚洲高清观看| 久久久久一本毛久久久| 久久久久人妻一区精品色 | 久久久久亚洲精品无码网址 | 亚洲国产精品无码久久一线| 精品999久久久久久中文字幕 | 久久精品国产第一区二区| 99蜜桃臀久久久欧美精品网站| 99久久www免费人成精品| 一本久久知道综合久久| 久久久精品人妻无码专区不卡 | 午夜久久久久久禁播电影| 精品免费久久久久国产一区| 狠狠88综合久久久久综合网| 久久人做人爽一区二区三区| 99久久精品九九亚洲精品|