编程介的小学生 2017-06-14 14:11 采纳率: 20.5%
浏览 1441
已采纳

74LS00

Problem Description
It’s known to us that 74LS00 is a useful digital logic chip for use in a variety of projects. Give you the voltage in all the pins. Your task is quite simple, just estimate whether the chip could work normally or not.
Here are some essential hints about the pins:

Note: If you chose Pins (1, 2) for input, only Pins (3) would indicate logic.

Here follow the definition of “logic”
If voltage Vi, |Vi-5|<=0.5 then we call it a “High Logic”
If voltage Vi is no larger than 0.8V, and Vi>=0 then we call it a “Low Logic”

“H”: High Logical
“L”: Low Logical
That is to say, if the voltage in Pin 1 is 5.0V and the voltage in Pin 2 is 5.0V, so the Pin 3 indicates Low Logic.
The voltage in Pin 14 must be exactly 5.0V so that the chip could work normally; the voltage in Pin 7 must be always Low Logic.

Input
The input consists of several test cases.
In the first line there is an integer n (2<=n<=10), indicating the number of descriptions.
The next n lines contain the descriptions of the different Pins
All the descriptions are given in the following format
Pin_ID Voltage
We guarantee that the Voltage is always in the range. (0<=Voltage<=0.8 or 4.5<=Voltage<=5.5)
We guarantee that Pin 14 and Pin 7 will always be given in every case.

Output
For each test case, if the chip could work normally, just output “Yes”, else output ”No” (without the quotations)
If the chip could work normally, please output the logic in the “Output Pins” if there exist some.
The format for output the “Output Pins” is:
Pin_ID Logic
Here Logic is either ‘H’ or ‘L’ as it described above.
Hint: You should output the “Output Pins” in ascending order in Pin_ID.

Sample Input
2
14 5.00000000
7 0.1
2
14 5.1
7 0.8
4
14 5.0000
7 0.7
1 0.3766
2 5.1344
6
14 5.00000000000
7 0
1 5.1
2 5.1
4 5.1
5 5.1

Sample Output
Yes
No
Yes
3 H
Yes
3 L
6 L

  • 写回答

1条回答 默认 最新

  • threenewbee 2017-07-09 09:58
    关注
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 求各位懂行的人,注册表能不能看到usb使用得具体信息,干了什么,传输了什么数据
  • ¥15 个人网站被恶意大量访问,怎么办
  • ¥15 Vue3 大型图片数据拖动排序
  • ¥15 Centos / PETGEM
  • ¥15 划分vlan后不通了
  • ¥15 GDI处理通道视频时总是带有白色锯齿
  • ¥20 用雷电模拟器安装百达屋apk一直闪退
  • ¥15 算能科技20240506咨询(拒绝大模型回答)
  • ¥15 自适应 AR 模型 参数估计Matlab程序
  • ¥100 角动量包络面如何用MATLAB绘制