495A - Digital Counter
1 second
256 megabytes
standard input
standard output
Malek lives in an apartment block with 100 floors numbered from 0 to 99.
The apartment has an elevator with a digital counter showing the floor that the elevator is currently on. The elevator shows each digit of a number with 7 light
sticks by turning them on or off. The picture below shows how the elevator shows each digit.
One day when Malek wanted to go from floor 88 to floor 0 using the
elevator he noticed that the counter shows number 89 instead of88.
Then when the elevator started moving the number on the counter changed to 87. After a little thinking Malek came to the conclusion that there is only one explanation
for this: One of the sticks of the counter was broken. Later that day Malek was thinking about the broken stick and suddenly he came up with the following problem.
Suppose the digital counter is showing number n. Malek calls an integer x (0 ≤ x ≤ 99) good if
it's possible that the digital counter was supposed to show x but because of some(possibly none) broken sticks it's showing n instead.
Malek wants to know number of good integers for a specific n. So you must write a program that calculates this number. Please note that the counter always shows
two digits.
The only line of input contains exactly two digits representing number n (0 ≤ n ≤ 99).
Note that n may have a leading zero.
In the only line of the output print the number of good integers.
89
2
00
4
73
15
In the first sample the counter may be supposed to show 88 or 89.
In the second sample the good integers are 00, 08, 80 and 88.
In the third sample the good integers are 03, 08, 09, 33, 38, 39, 73, 78, 79, 83, 88, 89, 93, 98, 99.
d=[2, 7, 2, 3, 3, 4, 2, 5, 1, 2]
a= gets.to_i
puts d[a/10]*d[a%10]
495A - Digital Counter的更多相关文章
- codeforces 495A. Digital Counter 解题报告
题目链接:http://codeforces.com/problemset/problem/495/A 这个题目意思好绕好绕~~好绕~~~~~,昨天早上做得 virtual 看不懂,晚上继续看还是,差 ...
- RFID 读写器 Reader Writer Cloner
RFID读写器的工作原理 RFID的数据采集以读写器为主导,RFID读写器是一种通过无线通信,实现对标签识别和内存数据的读出和写入操作的装置. 读写器又称为阅读器或读头(Reader).查询器(Int ...
- RFID Reader 线路图收集
This 125 kHz RFID reader http://www.serasidis.gr/circuits/RFID_reader/125kHz_RFID_reader.htm http:// ...
- Codeforces Round #282 (Div. 2) A
解题思路:用数组将每一个显示数字可能表示的数字种数存储起来即可 反思:第一次做的时候没有做出来是因为题意理解错误,第二次WA是因为情况没有考虑完全,1对应有7个数字,5对应有4个数字 A. ...
- Digital Current-Mode Control Challenges Analog Counterparts
http://electronicdesign.com/digital-ics/digital-current-mode-control-challenges-analog-counterparts ...
- Application binary interface and method of interfacing binary application program to digital computer
An application binary interface includes linkage structures for interfacing a binary application pro ...
- Cracking Digital VLSI Verification Interview 第二章
Computer Architecture 对Cracking Digital VLSI Verification Interview:Interview Success这本书的汉化,最新更新请关注微 ...
- UNITY自带的PACKAGE的UTILITY 里面有一个自带的FPS COUNTER
UNITY自带的PACKAGE的UTILITY 里面有一个自带的FPS COUNTER 可用,但是脚本是保密的?
- [LeetCode] Design Hit Counter 设计点击计数器
Design a hit counter which counts the number of hits received in the past 5 minutes. Each function a ...
随机推荐
- Problem E: 动物爱好者
Problem E: 动物爱好者 Time Limit: 1 Sec Memory Limit: 128 MBSubmit: 882 Solved: 699[Submit][Status][Web ...
- 使用js获取数组中最大、最小的数字
1.查询最大值 var maxValue=Math.max.apply(Math,array); 2.查询最小值 var minValue=Math.min.apply(Math,array);
- Quartus FFT IP核简介
为了突出重点,仅对I/O数据流为steaming的情况作简要说明,以便快速上手,有关FFT ip核模型及每种设置详细介绍请参考官方手册FFT MegaCore Function User Guide. ...
- 转载:一位资深程序员大牛给予Java初学者的学习路线建议
一位资深程序员大牛给予Java初学者的学习路线建议 java学习这一部分其实也算是今天的重点,这一部分用来回答很多群里的朋友所问过的问题,那就是我你是如何学习Java的,能不能给点建议?今天我是打 ...
- React+Redux实现追书神器网页版
引言 由于现在做的react-native项目没有使用到redux等框架,写了一段时间想深入学习react,有个想法想做个demo练手下,那时候其实还没想好要做哪一个类型的,也看了些动漫的,小说阅读, ...
- Android音视频通话过程中最小化成悬浮框的实现(类似Android8.0画中画效果)
关于音视频通话过程中最小化成悬浮框这个功能的实现,网络上类似的文章很多,但是好像还没看到解释的较为清晰的,这里因为项目需要实现了这样的一个功能,今天我把它记录下来,一方面为了以后用到便于自己查阅,一方 ...
- 巧学DBhelper
这几天在教我很重要的人学习,她属于那种超级小白,很超级的那种. 教她的过程中 发现有的知识点 不管这么教都不会.DBhelper就是不知道怎么记. 当时我就想到 杰哥(程杰)的出的大话系列,和他写书的 ...
- [动态规划]P1004 方格取数
---恢复内容开始--- 题目描述 设有N*N的方格图(N<=9),我们将其中的某些方格中填入正整数,而其他的方格中则放 人数字0.如下图所示(见样例): A 0 0 0 0 0 0 0 0 0 ...
- tpshop使用自带极光推送
推送逻辑在common里面的PushLogic.php;在后台网站->商城设置->推送设置,将极光的ID,密码填一下系统会自动加入数据库里面. 在你所需推送的PHP类里面引用这个文件即可. ...
- 集合、set以及HASH
集合的数据结构数据结构就是内存中保存输出数据的形式,不同的数据结构会有不同的特征.堆栈结构:先进后出 代表类(stack):应用场景:java中的方法运行时所占用的空间就是这种结构.队列结构:先进先出 ...