解题思路:用数组将每一个显示数字可能表示的数字种数存储起来即可
反思:第一次做的时候没有做出来是因为题意理解错误,第二次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. dw2018修改为中文

    dw2018 英文版修改为中文, 把zh_CN文件夹内的内容复制到en_US文件夹内并替换, 或者重命名zh_CN文件夹为en_US

  2. 优动漫PAINT(clip studio paint)提示无法连接服务器

    很多同学在使用优动漫PAINT进行艺术创作的时候,软件会出现无法连接服务器的提示,遇到此情况如何解决呢?目前,软件在Windows系统和Mac系统上的解决方法有别,请悉知: 1.曾使用过,或正在使用F ...

  3. 团体程序设计天梯赛-练习集-L1-026. I Love GPLT

    L1-026. I Love GPLT 这道超级简单的题目没有任何输入. 你只需要把这句很重要的话 —— “I Love GPLT”——竖着输出就可以了. 所谓“竖着输出”,是指每个字符占一行(包括空 ...

  4. 洛谷P3958 奶酪 并查集

    两个空洞可互达当且仅当两个空洞相切,即球心距离小于等于球的直径. 一一枚举两个可互达的空洞,并用并查集连起来即可. Code: #include<cstdio> #include<c ...

  5. Selenium 安装与配置及webdriver的API与定位元素

    1. selenium安装命令行 C:\Users\wu>cd /d E:\soft\python3.6\Scripts E:\soft\python3.6\Scripts>pip3 in ...

  6. Docker:分布式系统的软件工程革命(上)

    转自:http://cxwangyi.github.io/story/docker_revolution_1.md.html Docker:分布式系统的软件工程革命(上) 作者:王益 最后更新:201 ...

  7. ACdream 1415 Important Roads

    Important Roads Special JudgeTime Limit: 20000/10000MS (Java/Others)Memory Limit: 128000/64000KB (Ja ...

  8. String类常见的方法

    类String public final class String extends Object implements Serializable, comparable<String>, ...

  9. Scapy介绍官方文档翻译

    关于Scapy Scapy为何如此特别 高速的报文设计 一次探測多次解释 Scapy解码而不解释 高速展示Quick demo 合理的默认值 学习Python 本人英文水平有限,翻译不当之处,请參考官 ...

  10. Oracle 用户管理(一)

    1     创建用户     create user @username identified by @password     比如:create user aobama identified by ...