Codeforces 495 A. Digital Counterr && Codeforces Round #282 (Div. 2)
2014-12-14 10:48
381 查看
题目链接:http://codeforces.com/problemset/problem/495/A
解题思路:Codeforces官方题解:
For each digit x you
can count the number of digits y that
because of some broken sticks x is
shown instead of y by
hand. for example when x = 3, y can
be 3, 8 and 9.
Let's denote this number by ax.
Then if the input is xy (the
first digit shown in the counter is x and
the second is y)
the answer will be ax × ay.
水题,小心一点别数错就行了。
AC代码:
解题思路:Codeforces官方题解:
For each digit x you
can count the number of digits y that
because of some broken sticks x is
shown instead of y by
hand. for example when x = 3, y can
be 3, 8 and 9.
Let's denote this number by ax.
Then if the input is xy (the
first digit shown in the counter is x and
the second is y)
the answer will be ax × ay.
水题,小心一点别数错就行了。
AC代码:
#include<iostream> #include<cstdio> using namespace std; int main() { int a[]={2,7,2,3,3,4,2,5,1,2}; int n; while(scanf("%d",&n)!=EOF) printf("%d\n",a[n/10]*a[n%10]); return 0; }
相关文章推荐
- Codeforces 495 B. Modular Equations && Codeforces Round #282 (Div. 2)
- codeforces 181 div2 C&E
- Codeforces Round #434 (Div. 2, based on Technocup 2018 Elimination Round 1)&&Codeforces 861A k-rounding【暴力】
- Codeforces 136 divIID && zoj 3633 && HDU 4358
- Codeforces 851A && Round #432 Div. 2 A. Arpa and a research in Mexic
- CodeForces 833B Round#426 Div1B&Div2D The Bakery: DP+线段树
- Codeforces 494 A. Treasure && Codeforces Round #282 (Div. 1)
- [组合数] 51Nod 1161 Partial Sums & Codeforces 223C #138 (Div. 1) Partial Sums
- Codeforces Round #378 (Div. 2) C && Codeforces 733C (模拟)详解(两种写法)
- Codeforces 851B && Round #432 Div. 2 B. Arpa and an exam about geometry
- [广义后缀自动机] BZOJ 3473 字符串 & BZOJ 3277 串 & Codeforces 204E #129 (Div. 1) E. Little Elephant and Strings
- 付忠庆的练习小笔记-Codeforces #277.5 Div2 A&D
- Codeforces Round #378 (Div. 2) && codeforces 733D(思维枚举)
- Codeforces Round #209 (Div. 2) B && Codeforces 359 B(构造)
- Codeforces Round #434 (Div. 2, based on Technocup 2018 Elimination Round 1)&&Codeforces 861C Did you mean...【字符串枚举,暴力】
- [最小生成树] Codeforces 632F Educational Codeforces Round 9 F. Magic Matrix & SRM 687 div1 AllGraphCuts
- Codeforces Round #434 (Div. 2, based on Technocup 2018 Elimination Round 1)&&Codeforces 861B Which floor?【枚举,暴力】
- Codeforces Round #378 (Div. 2) B && codeforces 733B(暴力)
- Codeforces Round #383 (Div. 2) && Codeforces 742 B (标记技巧)
- codeforces 171 div2 C&E