Problem Description

Digital clock use 4 digits to express time, each digit is described by 3*3 characters (including”|”,”_”and” “).now given the current time, please tell us how can it be expressed by the digital clock.

Input

There are several test cases.

Each case contains 4 integers in a line, separated by space.

Proceed to the end of file.

Output

For each test case, output the time expressed by the digital clock such as Sample Output.

Sample Input
1 2 5 6
2 3 4 2
Sample Output
    _  _  _
  | _||_ |_
  ||_  _||_|
_  _     _
_| _||_| _|
|_  _|  ||_

这道题很明显就是判断输入并输出,虽然简单,不过分类的时候的确令人头痛

代码:
#include <stdio.h>
int main()
{
int c[];
while(scanf("%d",&c[])!=EOF)
{
for(int i=;i<=;i++)
scanf("%d",&c[i]); for(int i=;i<=;i++)
if(c[i]==||c[i]==||c[i]==||c[i]==||c[i]==||c[i]==||c[i]==||c[i]==)
printf(" _ ");
else if(c[i]==||c[i]==)
printf(" ");
printf("\n"); for(int i=;i<=;i++)
if(c[i]==||c[i]==)
printf(" |");
else if(c[i]==||c[i]==)
printf(" _|");
else if(c[i]==||c[i]==||c[i]==)
printf("|_|");
else if(c[i]==||c[i]==)
printf("|_ ");
else if(c[i]==)
printf("| |");
printf("\n"); for(int i=;i<=;i++)
if(c[i]==||c[i]==||c[i]==)
printf(" |");
else if(c[i]==)
printf("|_ ");
else if(c[i]==||c[i]==||c[i]==)
printf(" _|");
else if(c[i]==||c[i]==||c[i]==)
printf("|_|");
printf("\n");
} return ;
}

Problem: Time(一道水却有意思的题的更多相关文章

  1. HDU 5832 A water problem(某水题)

    p.MsoNormal { margin: 0pt; margin-bottom: .0001pt; text-align: justify; font-family: Calibri; font-s ...

  2. ny525 一道水题

    一道水题时间限制:1000 ms  |  内存限制:65535 KB 难度:2描述 今天LZQ在玩一种小游戏,但是这游戏数有一点点的大,他一个人玩的累,想多拉一些人进来帮帮他,你能写一个程序帮帮他吗? ...

  3. NYOJ-525一道水题思路及详解

    一道水题 时间限制:1000 ms  |  内存限制:65535 KB 难度:2 描述 今天LZQ在玩一种小游戏,但是这游戏数有一点点的大,他一个人玩的累,想多拉一些人进来帮帮他,你能写一个程序帮帮他 ...

  4. LibreOJ #6165. 一道水题

    二次联通门 : LibreOJ #6165. 一道水题 /* LibreOJ #6165. 一道水题 欧拉线性筛 其实题意就是求区间[1, n]所有数的最小公倍数 那么答案就是所有质因子最大幂次的乘积 ...

  5. CODE FESTIVAL 2017 qual B B - Problem Set【水题,stl map】

    CODE FESTIVAL 2017 qual B B - Problem Set 确实水题,但当时没想到map,用sort后逐个比较解决的,感觉麻烦些,虽然效率高很多.map确实好写点. 用map: ...

  6. 【图灵杯 F】一道简单的递推题(矩阵快速幂,乘法模板)

    Description 存在如下递推式: F(n+1)=A1*F(n)+A2*F(n-1)+-+An*F(1) F(n+2)=A1*F(n+1)+A2*F(n)+-+An*F(2) - 求第K项的值对 ...

  7. 一道很经典的 BFS 题

    一道很经典的 BFS 题 想认真的写篇题解. 题目来自:https://www.luogu.org/problemnew/show/P1126 题目描述 机器人移动学会(RMI)现在正尝试用机器人搬运 ...

  8. Problem E: 穷游中国在统题 优先队列 + 模拟

    http://www.gdutcode.sinaapp.com/problem.php?cid=1049&pid=4 Problem E: 穷游中国在统题 Description Travel ...

  9. 一道有趣的for循环题

    一道有趣的for循环题 今天在复习js基础知识时发现了一个for循环的题,第一眼看到直接懵逼了,没想到for循环竟然还可以这样玩?涨姿势了. 题目是这样的 for(i=0, j=0; i<10, ...

随机推荐

  1. line-height:150%与line-height:1.5的区别

    今天看到一篇文章,说的是CSS学习中的瓶颈,我最近也发现自己css很薄弱,写的样式总是有兼容性问题,要写很久,发现了一个问题,我从来没有用过line-height:150和line-height:1. ...

  2. webstrom

    1.webstrom如何在左边显示多个工程 File-> Settings -> Directories -> Add Content Root,选择你要加入的Project 点击O ...

  3. thymeleaf下拉框从后台动态获取集合数据并回显选中

    今天遇到从后台集合中取出对象在前台页面下拉列表展示: <select name="signature" lay-search="" class=" ...

  4. vue-详情列表偷懒遍历

    假如数据格式是这样的: 文案的字段名和数据的字段名完全对应,我们在处理数据的时候,就可以用: 完美:

  5. python----常见练习题

    1. 冒泡排序 def bubble_sort(lists): len_list=len(lists) for i in range(len_list): for j in range(len_lis ...

  6. Ubuntu配置MYSQL远程连接

    一.修改mysql权限 1.mysql -u root -p  回车输入密码 2.use mysql:      打开数据库 3.将host设置为%表示任何ip都能连接mysql,当然您也可以将hos ...

  7. CTeX安装警告

    CTeX在安装过程中总会覆盖系统全部的环境变量,之前曾经导致诸如ping.ipconfig以及CUDA全部无法工作,只能手动重装和手动恢复系统默认环境变量. 网上给出的解决方案有:在电脑未关机之前通过 ...

  8. 建设工程造价数据服务云平台(计价BIM)

    经过多次沟通和对招标文件的理解,招标人通过软件平台建立和使用人员库.项目库.材料设备价格库.数据库等四库的真实需求,本着招标人对“成果文件”(指造价.招标代理的计价成果),即“项目库”的计价文件,不打 ...

  9. 关于async 中return 和 return await 的差异

    小七平时在使用ES2017的 async功能经常会有如下: const bluebird = require('bluebird'); async function doSomething() { a ...

  10. 考研计算机复试(C语言复试笔试题)(精华题选)

    1.以下选择中,正确的赋值语句是(C) A.a=1,b=2 B.j++ C.a=b=5; D.y=(int)x 解析:选项A.B.D都无分号 变量 = 表达式;//赋值语句是一定带分号的 int a= ...