spy——C - Time

2024-06-09 05:08
文章标签 time spy

本文主要是介绍spy——C - Time,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

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
    _  _  _ 
  | _||_ |_ 
  ||_  _||_|
 _  _     _ 
 _| _||_| _|
|_  _|  ||_ 


Hint
The digits showed by the digital clock are as follows:
   _  _     _  _  _  _  _  _ 

 | _| _||_||_ |_   ||_||_|| |

 ||_  _|  | _||_|  ||_| _||_|

#include <iostream>
#include <cstring>
#include <algorithm>
#include <cstdio>
#include <string>
using namespace std;
string str1[11]={" _ ","   "," _ "," _ ","   "," _ "," _ "," _ "," _ "," _ "};
string str2[11]={"| |","  |"," _|"," _|","|_|","|_ ","|_ ","  |","|_|","|_|"};
string str3[11]={"|_|","  |","|_ "," _|","  |"," _|","|_|","  |","|_|"," _|"};
int main()
{int a,b,c,d;while(scanf("%d%d%d%d",&a,&b,&c,&d)!=EOF){cout<<str1[a]<<str1[b]<<str1[c]<<str1[d]<<endl;cout<<str2[a]<<str2[b]<<str2[c]<<str2[d]<<endl;cout<<str3[a]<<str3[b]<<str3[c]<<str3[d]<<endl;} return 0;
}


这篇关于spy——C - Time的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/1044294

相关文章

linux 下Time_wait过多问题解决

转自:http://blog.csdn.net/jaylong35/article/details/6605077 问题起因: 自己开发了一个服务器和客户端,通过短连接的方式来进行通讯,由于过于频繁的创建连接,导致系统连接数量被占用,不能及时释放。看了一下18888,当时吓到了。 现象: 1、外部机器不能正常连接SSH 2、内向外不能够正常的ping通过,域名也不能正常解析。

python内置模块datetime.time类详细介绍

​​​​​​​Python的datetime模块是一个强大的日期和时间处理库,它提供了多个类来处理日期和时间。主要包括几个功能类datetime.date、datetime.time、datetime.datetime、datetime.timedelta,datetime.timezone等。 ----------动动小手,非常感谢各位的点赞收藏和关注。----------- 使用datet

VS2022如何安装Spy+

Microsoft Spy++是一个非常好的查看Windows操作系统的窗口、消息、进程、线程信息的工具,简单易用,功能强大。 step1 安装vc++,点击下面官方链接进行下载 官方链接-VS++  下载完成后运行 点击继续 ,等待安装    等待安完成,自动启动  step2 暂时跳过此项  选择无需代码 选择工具,获取工具和功

lua data time

local getTime = os.date(“%c”); 其中的%c可以是以下的一种:(注意大小写) %a abbreviated weekday name (e.g., Wed) %A full weekday name (e.g., Wednesday) %b abbreviated month name (e.g., Sep) %B full month name (e.g., Sep

Event Time源码分析

《2021年最新版大数据面试题全面开启更新》 flink 中Processing Time也就是处理时间在watermark定时生成、ProcessFunction中定时器与时间类型的窗口中都有使用,但是其内部是如何实现注册定时器、如何调用、如何容错保证在任务挂掉在下次重启仍然能够触发任务执行,都是我们今天的主题。首先需要了解一下在flink内部时间系统是由哪些类来共同完成这件事,下面画

大数据-121 - Flink Time Watermark 详解 附带示例详解

点一下关注吧!!!非常感谢!!持续更新!!! 目前已经更新到了: Hadoop(已更完)HDFS(已更完)MapReduce(已更完)Hive(已更完)Flume(已更完)Sqoop(已更完)Zookeeper(已更完)HBase(已更完)Redis (已更完)Kafka(已更完)Spark(已更完)Flink(正在更新!) 章节内容 上节我们完成了如下的内容: 滑动窗口:时间驱动、事件

DS简记1-Real-time Joint Object Detection and Semantic Segmentation Network for Automated Driving

创新点 1.更小的网络,更多的类别,更复杂的实验 2. 一体化 总结 终于看到一篇检测跟踪一体化的文章 网络结构如下: ResNet10是共享的Encoder,yolov2 是检测的Deconder,FCN8 是分割的Deconder。 其实很简单,论文作者也指出:Our work is closest to the recent MultiNet. We differ by focus

Go-Time

日期&时间格式化。 package mainimport ("fmt""time")func main() {now := time.Now()now_string := fmt.Sprintf("%d%02d%02d-%02d%02d%02d-Others",now.Year(), now.Month(), now.Day(),now.Hour(), now.Minute(), now.Se

音视频入门基础:WAV专题(8)——FFmpeg源码中计算WAV音频文件AVStream的time_base的实现

一、引言 本文讲解FFmpeg源码对WAV音频文件进行解复用(解封装)时,其AVStream的time_base是怎样被计算出来的。 二、FFmpeg源码中计算WAV音频文件AVStream的time_base的实现 从《音视频入门基础:WAV专题(5)——FFmpeg源码中解码WAV Header的实现》中可以知道,FFmpeg对WAV音频文件进行解复用(解封装)时,其源码内部

el-time-select 动态增加时间

<template><div><div v-for="(item, index) in timeSlots" :key="index"><el-time-select placeholder="起始时间" v-model="item.startTime" :picker-options="{start: '00:00',step: '00:15',end: '23:59',}"></el-ti