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. shift and算法

    1. CF 914F Substrings in a String 大意: 给定一个串s, q个询问, (1)单点修改, (2)询问[l,r]范围内串y的出现次数. shift and算法板子题 #p ...

  2. fiddler安装及mock数据

    1,fiddler安装,解决无法抓到https问题 可用本机的火狐浏览器测试,不行,就fiddler生成证书,拷到火狐里 在firefox中,选项->进入配置界面:高级-> 证书 -> ...

  3. URL组成部分详解

    URL组成部分详解 URL是Uniform Resource Locator的简写,统一资源定位符. 一个URL是由以下几部分组成的: scheme://host:port/path/?query-s ...

  4. python--日志模块

    一.logging模块就是python里面用来操作日志的模块,logging模块中主要有4个类,分别负责不同的工作 1. Logger 记录器,暴露了应用程序代码能直接使用的接口:简单点说就是一个创建 ...

  5. popstate事件在低版本webkit中的调用

    popstate是H5的history系列中的事件,但是在低版本的webkit中会自动触发.H5中的history api是不会使页面发生跳转的,只是操作地址栏和响应的state属性而已,而且是手动操 ...

  6. 微信小程序开发学习(一):开发前准备

    开发前准备 Step1:注册 微信小程序开放平台: https://mp.weixin.qq.com/cgi-bin/wx 开发者注册: https://mp.weixin.qq.com/wxopen ...

  7. c++重要知识点

    C++重要知识点精华总结 cin的使用: 1>cin>>a;键盘读入数据赋值给a; 1>程序的输入都建有一个缓冲区,即输入缓冲区.一次输入过程是这样的,当一次键盘输入结束时会将 ...

  8. week3

    ___________________________________函数________________________ 返回值 = 0 ,返回 0 返回值 = 1, 返回object 返回值> ...

  9. 小白的python之路10/29 文件归档

    一打包解包文件 [root@localhost ~]# cd /test/[root@localhost test]# touch a.txt b.txt c.txt[root@localhost t ...

  10. Nodejs搭建基于express的应用,使用脚手架工具--express-generator

    1.安装nodejs 1> 去nodejs官网下载最新nodejs安装包,地址:http://nodejs.cn/download/,选择自己适合自己电脑系统的安装包,下载下来,然后一直next ...