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. ansible如果兼容Centos5

    基本安装 安装gcc,用于编译python源码 yum install gcc 更新python版本 centos自带python2.6版本,由于centos已对python深度依赖,所以更新pyth ...

  2. TPS,并发用户数,吞吐量以及一些计算公式

    TPS,并发用户数,吞吐量以及一些计算公式 基本概念 TPS:每秒同时处理的请求数/事务数 并发数:系统同时处理的请求数/事务数 响应时间:一般去平均响应时间,只有当方差过大时,去90%的响应时间值 ...

  3. mac系统 安装pip,用python读写excel(xlrd、xlwt)安装

    1: 先安装python, 下载地址:https://www.python.org/downloads/release/python-372/ 2: 安装pip 下载一个get-pip.py的文件  ...

  4. .net core 连接mysql

    Package引入: mysql.data MySql.Data.EntityFrameworkCore Pomelo.EntityFrameworkCore.MySql 2. 在package ma ...

  5. bash: ./xxx 权限不够

    Linux环境下要运行C编译的一个可执行文件play,终端cd到当前目录后输入./play,提示  bash: ./xxx 权限不够 用sudo, 提示 sudo:./play: command no ...

  6. elasticsearch多字段搜索

    https://blog.csdn.net/Ricky110/article/details/78888711 多字段搜索多字符串查询boost 参数 “最佳” 值,较为简单的方式就是不断试错,比较合 ...

  7. CPU、GPU、CUDA、cuDNN

    CPU擅长逻辑处理控制,GPU适合高强度的并行计算任务,为什么会存在这种差别?今天搜集了些相关资料,摘抄总结如下. 一.什么是GPU GPU这个概念是由Nvidia公司于1999年提出的.GPU是显卡 ...

  8. MVP技术沙龙上海站-SQL BI

    5月,微软爱好者们齐聚一起,在上海港汇中心,参加<MVP技术沙龙上海站-SQL BI>系列讲座,下面是现场图片.  

  9. react项目搭建及webpack配置

    1,配置webpack npm install -g webpack                       webpack的cli环境 npm install -g webpack-dev-se ...

  10. django数据库的表已迁移的不能重新迁移的解决办法

    django.db.utils.InternalError: (1050, "Table 'tb_content' already exists") mysql数据库在迁移时数据库 ...