解题思路:用数组将每一个显示数字可能表示的数字种数存储起来即可
反思:第一次做的时候没有做出来是因为题意理解错误,第二次WA是因为情况没有考虑完全,1对应有7个数字,5对应有4个数字
 
 
 
A. Digital Counter
time limit per test

1 second

memory limit per test

256 megabytes

input

standard input

output

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 of 88. 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.

Input

The only line of input contains exactly two digits representing number n (0 ≤ n ≤ 99). Note that n may have a leading zero.

Output

In the only line of the output print the number of good integers.

Sample test(s)
input
89
output
2
input
00
output
4
input
73
output
15
Note

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.

#include<stdio.h>
int main()
{
int n,a[10]={2,7,2,3,3,4,2,5,1,2};
while(scanf("%d",&n)!=EOF)
{
printf("%d\n",a[n/10]*a[n%10]);
}
}

  

Codeforces Round #282 (Div. 2) A的更多相关文章

  1. Codeforces Round #282 (Div. 1) A. Treasure 水题

    A. Treasure Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/494/problem/A ...

  2. Codeforces Round #282 Div.1 B Obsessive String --DP

    题意: 给两个串S,T,问能找出多少的S的(a1,b1)(a2,b2)..(ak,bk),使Sa1---Sb1,...Sak---Sbk都包含子串T,其中k>=1,且(a1,b1)...(ak, ...

  3. codeforces 494a//Treasure// Codeforces Round #282(Div. 1)

    题意:一个'('  ,  ')'  ,  '#'组成的串,可将'#'换成至少一个')'.问一个换法能使串匹配. 至少换成一个,那么就先都换成一个,记结果为str.最后一个')'的后面没有未匹配的'(' ...

  4. 数学 Codeforces Round #282 (Div. 2) B. Modular Equations

    题目传送门 题意:a % x == b,求符合条件的x有几个 数学:等式转换为:a == nx + b,那么设k = nx = a - b,易得k的约数(>b)的都符合条件,比如a=25 b=1 ...

  5. Codeforces Round #282 (Div. 1)B. Obsessive String KMP+DP

    B. Obsessive String   Hamed has recently found a string t and suddenly became quite fond of it. He s ...

  6. Codeforces Round #366 (Div. 2) ABC

    Codeforces Round #366 (Div. 2) A I hate that I love that I hate it水题 #I hate that I love that I hate ...

  7. Codeforces Round #354 (Div. 2) ABCD

    Codeforces Round #354 (Div. 2) Problems     # Name     A Nicholas and Permutation standard input/out ...

  8. Codeforces Round #368 (Div. 2)

    直达–>Codeforces Round #368 (Div. 2) A Brain’s Photos 给你一个NxM的矩阵,一个字母代表一种颜色,如果有”C”,”M”,”Y”三种中任意一种就输 ...

  9. cf之路,1,Codeforces Round #345 (Div. 2)

     cf之路,1,Codeforces Round #345 (Div. 2) ps:昨天第一次参加cf比赛,比赛之前为了熟悉下cf比赛题目的难度.所以做了round#345连试试水的深浅.....   ...

随机推荐

  1. MVC 返回json数据

    使用 return Json(pageList, JsonRequestBehavior.AllowGet); 返回object 使用 return Content(JsonConvert.Seria ...

  2. mysql 各项操作流程

    启动mysql:进入命令行输入:net start mysql 如果失败则显示:服务名无效,需跳转到指定Bin目录下进行启动mysql, 成功则进行下一步:登陆 :mysql -uroot -proo ...

  3. VS Code中html 如何查找标签(5)

    1  添加几个标签 <body> <span>第一个span标签</span> <p>这是第一个p标签</p> <span>第二 ...

  4. POI操作Excel的三种Workbook的发展和区别

    POI的一些使用方法: 创建流程:(上级为下级的载体) 1.创建Workbook(工作薄): 2.创建Sheet(表单,可以创建多个): 3.创建Row(行): 4.创建Cell(单元格) 接下来分别 ...

  5. AM335X用RGB888连接LCD如何以16位色彩模式显示图片

    在AM335x中,在连接显示屏的时候,存在一个问题.这个在am335x Sillicon Errata已经提到过 在RGB888模式中   而对于RGB565模式的硬件连接 不难看出,这个RGB是反的 ...

  6. 天使轮 A轮 B轮 上市...等名词解释

    看到一篇漫画解释的很形象:

  7. 【Linux常见问题总结】

    1. 如何设置vim编辑器TAB的缩进量?自己在使用Linux编写Python脚本的时候发现TAB的缩进量总是太长,于是想自己修改下vim编辑器的缩进量. 在/etc/vim/ 文件夹下建立 .vim ...

  8. SpringBoot 配置 @ConfigurationProperties 与 @Value 区别

    一.SpringBoot 配置 @ConfigurationProperties 与 @Value 区别 配置文件 yml 还是 properties 他们都能获取到值: 如果说,我们只是在某个业务逻 ...

  9. 利用Selenium实现图片文件上传的两种方式介绍

    在实现UI自动化测试过程中,有一类需求是实现图片上传,这种需求根据开发的实现方式,UI的实现方式也会不同. 一.直接利用Selenium实现 这种方式是最简单的一种实现方式,但是依赖于开发的实现. 当 ...

  10. js 现给数字加三位一逗号间隔的种方法

    方法一:(ie下有问题) <script type= "text/javascript"> var num_s = "1232134456.546 " ...