text stringlengths 49 983k |
|---|
#include <bits/stdc++.h>
using namespace std;
long s[10] = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2};
int main() {
long i, j, k, a, b, n;
cin >> n;
a = n / 10;
b = n % 10;
cout << s[a] * s[b];
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
map<int, int> m;
m[0] = 2;
m[1] = 7;
m[2] = 2;
m[3] = 3;
m[4] = 3;
m[5] = 4;
m[6] = 2;
m[7] = 5;
m[8] = 1;
m[9] = 2;
int n;
cin >> n;
int a, b;
a = n % 10;
n /= 10;
b = n;
cout << m[a] * m[b];
}
|
#include <bits/stdc++.h>
using namespace std;
string art[10000];
string number[20] = {"zero", "one", "two", "three", "four",
"five", "six", "seven", "eight", "nine",
"ten", "eleven", "twelve", "thirteen", "fourteen",
"fifteen", "sixteen", "seventeen", "eighteen", "nineteen"};
bool bland(string sss) {
string xx = sss;
reverse(sss.begin(), sss.end());
if (xx == sss) return 1;
return 0;
}
int gcd(int aaa, int bbb) { return !bbb ? aaa : gcd(bbb, aaa % bbb); }
int main() {
int tp = 1, z = 1;
char ch[2];
cin >> ch[0] >> ch[1];
{
if (ch[0] == '0' || ch[0] == '2' || ch[0] == '6' || ch[0] == '9')
tp *= 2;
else if (ch[0] == '1')
tp *= 7;
else if (ch[0] == '3' || ch[0] == '4')
tp *= 3;
else if (ch[0] == '5')
tp *= 4;
else if (ch[0] == '7')
tp *= 5;
else if (ch[0] == '8')
tp *= 1;
}
{
if (ch[1] == '0' || ch[1] == '2' || ch[1] == '6' || ch[1] == '9')
z *= 2;
else if (ch[1] == '1')
tp *= 7;
else if (ch[1] == '3' || ch[1] == '4')
z *= 3;
else if (ch[1] == '5')
z *= 4;
else if (ch[1] == '7')
z *= 5;
else if (ch[1] == '8')
z *= 1;
}
cout << tp * z;
}
|
#include <bits/stdc++.h>
using namespace std;
int main(void) {
int digits[] = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2};
int number = 0;
int goodNumbers = 0;
cin >> number;
goodNumbers = digits[number / 10] * digits[number % 10];
cout << goodNumbers;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
map<char, int> m;
m[0] = 2;
m[1] = 7;
m[2] = 2;
m[3] = 3;
m[4] = 3;
m[5] = 4;
m[6] = 2;
m[7] = 5;
m[8] = 1;
m[9] = 2;
string a;
cin >> a;
long long ans = 1;
for (int _n((a).size()), i(0); i < _n; i++) ans *= m[a[i] - '0'];
cout << ans;
return 0;
}
|
#include <bits/stdc++.h>
int main() {
int n, a, b;
scanf("%d", &n);
a = n / 10;
b = n % 10;
if (a == 0 || a == 2 || a == 6 || a == 9) {
a = 2;
} else if (3 <= a && a < 5) {
a = 3;
} else if (a == 5) {
a = 4;
} else if (a == 1) {
a = 7;
} else if (a == 7) {
a = 5;
} else {
a = 1;
}
if (b == 0 || b == 2 || b == 6 || b == 9) {
b = 2;
} else if (3 <= b && b < 5) {
b = 3;
} else if (b == 5) {
b = 4;
} else if (b == 1) {
b = 7;
} else if (b == 7) {
b = 5;
} else {
b = 1;
}
printf("%d", a * b);
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
ios ::sync_with_stdio(0);
cin.tie(0);
int a[] = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2};
string n;
cin >> n;
int left = n[0] - '0';
int right = n[1] - '0';
cout << a[left] * a[right];
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int noGoods(int a) {
if (a == 0) return 2;
if (a == 1) return 7;
if (a == 2) return 2;
if (a == 3) return 3;
if (a == 4) return 3;
if (a == 5) return 4;
if (a == 6) return 2;
if (a == 7) return 5;
if (a == 8) return 1;
if (a == 9) return 2;
}
int main() {
int input;
cin >> input;
int a = input % 10;
int b = (input - a) / 10;
int output = noGoods(a) * noGoods(b);
cout << output;
}
|
#include <bits/stdc++.h>
using namespace std;
int arr[] = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2};
int main() {
int n, res = 1;
scanf("%d", &n);
res = res * arr[n % 10] * arr[n / 10];
cout << res << endl;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int n, m, len;
int dig[10];
void initz() {
dig[0] = 2;
dig[1] = 7;
dig[2] = 2;
dig[3] = 3;
dig[4] = 3;
dig[5] = 4;
dig[6] = 2;
dig[7] = 5;
dig[8] = 1;
dig[9] = 2;
}
int main() {
int i, j, k, t, a, b;
cin >> a;
initz();
int first, second = a % 10;
first = (a / 10) % 10;
cout << dig[first] * dig[second] << "\n";
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int val[10] = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2};
int n, sum = 0;
cin >> n;
sum += val[n % 10];
n /= 10;
sum *= val[n % 10];
cout << sum << endl;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int sum(char x) {
if (x == '1')
return 7;
else if (x == '2')
return 2;
else if (x == '3')
return 3;
else if (x == '4')
return 3;
else if (x == '5')
return 4;
else if (x == '6')
return 2;
else if (x == '7')
return 5;
else if (x == '8')
return 1;
else if (x == '9')
return 2;
else if (x == '0')
return 2;
}
int main() {
string g;
cin >> g;
cout << (sum(g[0])) * (sum(g[1]));
}
|
#include <bits/stdc++.h>
using namespace std;
char a, b;
int mas[10] = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2};
int main() {
cin >> a >> b;
printf("%d", mas[a - '0'] * mas[b - '0']);
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int arr[10] = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2}, n;
cin >> n;
cout << arr[n / 10] * arr[n % 10] << endl;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int ar[] = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2};
int main() {
int n, a, sum = 1;
cin >> n;
for (int i = 0; i < 2; i++) {
a = n % 10;
sum *= ar[a];
n /= 10;
}
cout << sum << endl;
return 0;
}
|
#include <bits/stdc++.h>
int main() {
int Num;
int Arr[10] = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2};
scanf("%d", &Num);
int first = Num / 10;
int Last = Num - first * 10;
int counter = Arr[first] * Arr[Last];
printf("%d", counter);
return 0;
}
|
#include <bits/stdc++.h>
int main() {
int m, n, u[10] = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2};
scanf("%d", &n);
m = u[(n / 10)] * u[(n % 10)];
printf("%d", m);
return 0;
}
|
#include <bits/stdc++.h>
int main() {
char c = '0';
int sum = 1, i = 0;
for (i = 0; i < 2; i++) {
scanf(" %c", &c);
switch (c) {
case '1':
sum *= 7;
break;
case '2':
sum *= 2;
break;
case '3':
sum *= 3;
break;
case '4':
sum *= 3;
break;
case '5':
sum *= 4;
break;
case '6':
sum *= 2;
break;
case '7':
sum *= 5;
break;
case '8':
sum *= 1;
break;
case '9':
sum *= 2;
break;
case '0':
sum *= 2;
break;
default:
break;
}
}
printf("%d\n", sum);
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int arr[10] = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2};
char c, c1;
cin >> c >> c1;
cout << arr[c - '0'] * arr[c1 - '0'] << endl;
return 0;
}
|
#include <bits/stdc++.h>
int main() {
int num[10] = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2};
int n;
scanf("%d", &n);
int r = 0;
int x = 1;
while (r < 2) {
x *= num[n % 10];
n = n / 10;
r++;
}
printf("%d\n", x);
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
signed main() {
int n;
cin >> n;
int pre[] = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2};
int f = n / 10;
int s = n % 10;
cout << pre[f] * pre[s];
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
char arr[5];
int i, j, n, a, b;
cin >> arr;
a = int(arr[0] - '0');
b = int(arr[1] - '0');
int cnt[10];
cnt[0] = 2;
cnt[1] = 7;
cnt[2] = 2;
cnt[3] = 3;
cnt[4] = 3;
cnt[5] = 4;
cnt[6] = 2;
cnt[7] = 5;
cnt[8] = 1;
cnt[9] = 2;
printf("%d", cnt[a] * cnt[b]);
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
#pragma warning(disable : 4996)
int ar[10] = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2};
vector<int> v;
char c;
while (scanf(" %c", &c) > 0 && c != '\n') {
v.push_back(c -= '0');
}
int ans = 1;
for (int i = 0; i < v.size(); i++) ans *= ar[v[i]];
printf("%d", ans);
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int A[10] = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2};
int main() {
int a, b;
string s;
cin >> s;
for (int i = 0; A[i]; i++) {
if (s[0] - '0' == i) a = A[i];
if (s[1] - '0' == i) b = A[i];
}
cout << a * b << endl;
return 0;
}
|
#include <bits/stdc++.h>
void sc(int &x) { scanf("%d", &x); }
void sc(long long int &x) { scanf("%lld", &x); }
void sc(char *x) { scanf("%s", x); }
void sc(double &x) { scanf("%lf", &x); }
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
int n;
cin >> n;
int p = n % 10;
int q = n / 10;
int ar[10] = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2};
cout << ar[p] * ar[q] << endl;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0), cout.tie(0);
bool arr[10][10];
memset(arr, 0, sizeof arr);
arr[0][0] = arr[0][8] = true;
arr[1][0] = arr[1][1] = arr[1][3] = arr[1][4] = arr[1][7] = arr[1][8] =
arr[1][9] = true;
arr[2][2] = arr[2][8] = true;
arr[3][3] = arr[3][8] = arr[3][9] = true;
arr[4][4] = arr[4][8] = arr[4][9] = true;
arr[5][5] = arr[5][6] = arr[5][8] = arr[5][9] = true;
arr[6][6] = arr[6][8] = true;
arr[7][0] = arr[7][3] = arr[7][7] = arr[7][8] = arr[7][9] = true;
arr[8][8] = true;
arr[9][8] = arr[9][9] = true;
int n1, n2;
cin >> n1;
n2 = n1 % 10, n1 /= 10;
cout << count(arr[n1], arr[n1] + 10, true) *
count(arr[n2], arr[n2] + 10, true);
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
const double EXP = 2.7182818284590452;
const double Pi = 3.1415926358979323;
bool prime(long long n) {
if (n == 1) return false;
for (long long i = 2; i <= sqrt(n); i++)
if (n % i == 0) return false;
return true;
}
long long gcd(long long a, long long b) {
while (a * b) {
if (a > b)
a %= b;
else
b %= a;
}
return a + b;
}
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
long long exgcd(long long a, long long b, long long& x, long long& y) {
if (a == 0) {
x = 0;
y = 1;
return b;
}
long long x1, y1;
long long d = exgcd(b % a, a, x1, y1);
x = y1 - (b / a) * x1;
y = x1;
return d;
}
long long poww(long long val, long long p, long long mod) {
if (p == 1) return val % mod;
if (p == 0) return 1;
long long res;
if (p & 1) {
res = (val % mod) * poww(val, p - 1, mod);
} else {
long long t = poww(val, p / 2, mod);
res = t * t;
}
return res % mod;
}
int a, b, res = 0;
int func(char v) {
switch (v) {
case '0':
return 2;
case '1':
return 7;
case '2':
return 2;
case '3':
return 3;
case '4':
return 3;
case '5':
return 4;
case '6':
return 2;
case '7':
return 5;
case '8':
return 1;
case '9':
return 2;
}
}
int main(void) {
scanf("%c%c", &a, &b);
res = func(a) * func(b);
printf("%d", res);
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int stick[11] = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2};
int n, x;
cin >> n;
int n1, n2;
n1 = (n % 10);
n2 = (n / 10);
x = stick[n1] * stick[n2];
cout << x << endl;
}
|
#include <bits/stdc++.h>
using namespace std;
char p[5];
int q[12] = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2};
int main() {
while (cin >> p) {
int t = int(p[0] - '0');
int tt = int(p[1] - '0');
int ans = q[t] * q[tt];
cout << ans << endl;
}
return 0;
}
|
#include <bits/stdc++.h>
bool counter[10][7] = {
{1, 1, 1, 0, 1, 1, 1}, {0, 0, 1, 0, 0, 1, 0}, {1, 0, 1, 1, 1, 0, 1},
{1, 0, 1, 1, 0, 1, 1}, {0, 1, 1, 1, 0, 1, 0}, {1, 1, 0, 1, 0, 1, 1},
{1, 1, 0, 1, 1, 1, 1}, {1, 0, 1, 0, 0, 1, 0}, {1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 0, 1, 1},
};
int main() {
char a, b;
scanf("%c%c", &a, &b);
a -= 48;
b -= 48;
int res = 0;
for (char c = 0; c < 10; ++c)
for (char d = 0; d < 10; ++d) {
bool good = 1;
for (int i = 0; i < 7; ++i)
if (counter[a][i] && !counter[c][i]) good = 0;
for (int i = 0; i < 7; ++i)
if (counter[b][i] && !counter[d][i]) good = 0;
if (good) ++res;
}
printf("%d", res);
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int a[] = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2}, n;
int main() {
cin >> n;
cout << a[n / 10] * a[n % 10] << endl;
}
|
#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
template <typename T>
void die(T s) {
cout << s;
exit(0);
}
int main() {
ios_base::sync_with_stdio(0);
int tab[10] = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2};
char c1, c2;
cin >> c1 >> c2;
cout << tab[c1 - '0'] * tab[c2 - '0'];
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
long long a[100];
int main() {
a[0] = 2;
a[1] = 7;
a[2] = 2;
a[3] = 3;
a[4] = 3;
a[5] = 4;
a[6] = 2;
a[7] = 5;
a[8] = 1;
a[9] = 2;
string s;
cin >> s;
int k = 1;
for (int i = 0; i < s.size(); i++) {
k *= a[(int(s[i] - 48))];
}
cout << k;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(NULL);
int n;
cin >> n;
int array[10] = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2};
int first = n % 10;
int second = n / 10;
cout << array[first] * array[second];
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int ara[] = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2};
int main() {
string s;
cin >> s;
int n = s[0] - '0';
int sum = ara[n];
n = s[1] - '0';
sum *= ara[n];
cout << sum;
}
|
#include <bits/stdc++.h>
using namespace std;
int n, f, m, k, l, g, i, h, a, b, j, a1, b1, c1, c, x, y, q, w, e, r, t, d[15];
int main() {
cin >> n;
d[0] = 2;
d[1] = 7;
d[2] = 2;
d[3] = 3;
d[4] = 3;
d[5] = 4;
d[6] = 2;
d[7] = 5;
d[8] = 1;
d[9] = 2;
a = n / 10;
b = n % 10;
cout << d[a] * d[b];
}
|
#include <bits/stdc++.h>
using namespace std;
int poss_num(int num) {
switch (num) {
case 0:
return 2;
case 1:
return 7;
case 2:
return 2;
case 3:
return 3;
case 4:
return 3;
case 5:
return 4;
case 6:
return 2;
case 7:
return 5;
case 8:
return 1;
case 9:
return 2;
}
}
int main() {
ios_base::sync_with_stdio(false);
int N;
cin >> N;
int t = N % 10;
N /= 10;
cout << poss_num(t) * poss_num(N);
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int ar[10] = {119, 18, 93, 91, 58, 107, 111, 82, 127, 123};
int main() {
string s;
getline(cin, s);
int a = s[0] - '0';
int res1 = 0;
for (int i = 0; i < 128; i++) {
if ((i & ar[a]) == 0) {
for (int j = 0; j < 10; j++) {
if (ar[j] == (i | ar[a])) {
res1++;
break;
}
}
}
}
a = s[1] - '0';
int res2 = 0;
for (int i = 0; i < 128; i++) {
if ((i & ar[a]) == 0) {
for (int j = 0; j < 10; j++) {
if (ar[j] == (i | ar[a])) {
res2++;
break;
}
}
}
}
printf("%d\n", res1 * res2);
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
struct snm {
int pr[1111], siz[1111];
void now(int x) {
for (int i = 0; i < x; i++) {
pr[i] = i;
siz[i] = 1;
}
}
int pred(int x) {
if (x == pr[x]) {
return x;
}
pr[x] = pred(pr[x]);
return pr[x];
}
void sli(int a, int b) {
a = pred(a);
b = pred(b);
if (siz[a] > siz[b]) {
swap(a, b);
}
siz[b] += siz[a];
pr[a] = b;
}
};
int main() {
int n;
cin >> n;
int a = n / 10;
int b = n % 10;
int out1 = 0;
int out2 = 0;
if (a == 0) {
out1 = 2;
}
if (a == 1) {
out1 = 7;
}
if (a == 2) {
out1 = 2;
}
if (a == 3) {
out1 = 3;
}
if (a == 4) {
out1 = 3;
}
if (a == 5) {
out1 = 4;
}
if (a == 6) {
out1 = 2;
}
if (a == 7) {
out1 = 5;
}
if (a == 8) {
out1 = 1;
}
if (a == 9) {
out1 = 2;
}
if (b == 0) {
out2 = 2;
}
if (b == 1) {
out2 = 7;
}
if (b == 2) {
out2 = 2;
}
if (b == 3) {
out2 = 3;
}
if (b == 4) {
out2 = 3;
}
if (b == 5) {
out2 = 4;
}
if (b == 6) {
out2 = 2;
}
if (b == 7) {
out2 = 5;
}
if (b == 8) {
out2 = 1;
}
if (b == 9) {
out2 = 2;
}
cout << out1 * out2;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
string str;
cin >> str;
int arr[] = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2};
int ans = 0;
ans = arr[str[0] - '0'] * arr[str[1] - '0'];
cout << ans;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
string s;
char s1, s2;
cin >> s;
s1 = s[0];
s2 = s[1];
int k1, k2;
if (s[0] == '0') k1 = 2;
if (s[0] == '1') k1 = (7);
if (s[0] == '2') k1 = (2);
if (s[0] == '3') k1 = (3);
if (s[0] == '4') k1 = (3);
if (s[0] == '5') k1 = (4);
if (s[0] == '6') k1 = (2);
if (s[0] == '7') k1 = (5);
if (s[0] == '8') k1 = (1);
if (s[0] == '9') k1 = (2);
if (s[1] == '0') k2 = 2;
if (s[1] == '1') k2 = (7);
if (s[1] == '2') k2 = (2);
if (s[1] == '3') k2 = (3);
if (s[1] == '4') k2 = (3);
if (s[1] == '5') k2 = (4);
if (s[1] == '6') k2 = (2);
if (s[1] == '7') k2 = (5);
if (s[1] == '8') k2 = (1);
if (s[1] == '9') k2 = (2);
cout << k1 * k2;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
const int maxn = 3e5 + 10;
int dig[] = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2};
int main() {
int n;
scanf("%d", &n);
printf("%d\n", dig[n % 10] * dig[n / 10]);
return 0;
}
|
#include <bits/stdc++.h>
int main() {
int n, x1, x2, i, j;
scanf("%d", &n);
x1 = n % 10;
x2 = n / 10;
if (x1 == 0)
i = 2;
else if (x1 == 1)
i = 7;
else if (x1 == 2)
i = 2;
else if (x1 == 3)
i = 3;
else if (x1 == 4)
i = 3;
else if (x1 == 5)
i = 4;
else if (x1 == 6)
i = 2;
else if (x1 == 7)
i = 5;
else if (x1 == 8)
i = 1;
else
i = 2;
if (x2 == 0)
j = 2;
else if (x2 == 1)
j = 7;
else if (x2 == 2)
j = 2;
else if (x2 == 3)
j = 3;
else if (x2 == 4)
j = 3;
else if (x2 == 5)
j = 4;
else if (x2 == 6)
j = 2;
else if (x2 == 7)
j = 5;
else if (x2 == 8)
j = 1;
else
j = 2;
printf("%d", i * j);
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
map<char, int> v;
int main(void) {
v['0'] = 2;
v['1'] = 7;
v['2'] = 2;
v['3'] = 3;
v['4'] = 3;
v['5'] = 4;
v['6'] = 2;
v['7'] = 5;
v['8'] = 1;
v['9'] = 2;
string n;
int res = 1;
cin >> n;
for (int i = n.size() - 1; i >= 0; i--) {
res = v[n[i]] * res;
}
cout << res << endl;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int A[1000];
int main() {
int n, p, t, a, i;
cin >> n;
A[0] = 2;
A[1] = 7;
A[2] = 2;
A[3] = 3;
A[4] = 3;
A[5] = 4;
A[6] = 2;
A[7] = 5;
A[8] = 1;
A[9] = 2;
cout << A[n / 10] * A[n % 10];
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int c = 1;
string n;
cin >> n;
map<char, int> m;
m['0'] = 2;
m['1'] = 7;
m['2'] = 2;
m['3'] = 3;
m['4'] = 3;
m['5'] = 4;
m['6'] = 2;
m['7'] = 5;
m['8'] = 1;
m['9'] = 2;
for (int i = 0; i < n.size(); i++) {
c *= m[n[i]];
}
cout << c;
return 0;
}
|
#include <bits/stdc++.h>
int main() {
int k, n, u, t, m;
scanf("%d", &n);
u = n % 10;
t = (n - u) / 10;
if (u == 0) k = 2;
if (u == 1) k = 7;
if (u == 2) k = 2;
if (u == 3) k = 3;
if (u == 4) k = 3;
if (u == 5) k = 4;
if (u == 6) k = 2;
if (u == 7) k = 5;
if (u == 8) k = 1;
if (u == 9) k = 2;
if (t == 0) n = 2;
if (t == 1) n = 7;
if (t == 2) n = 2;
if (t == 3) n = 3;
if (t == 4) n = 3;
if (t == 5) n = 4;
if (t == 6) n = 2;
if (t == 7) n = 5;
if (t == 8) n = 1;
if (t == 9) n = 2;
printf("%d", k * n);
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
;
string a;
cin >> a;
int ans = 1, arr[11] = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2};
for (int i = 0; i < a.size(); i++) {
ans *= arr[int(a[i] - '0')];
}
cout << ans << "\n";
return 0;
}
|
#include <bits/stdc++.h>
inline int Rand() { return (rand() << 16) | rand(); }
using namespace std;
const int N = 200005;
const double eps = 1e-9;
int d[20];
int main() {
d[0] = 2;
d[1] = 7;
d[2] = 2;
d[3] = 3;
d[4] = 3;
d[5] = 4;
d[6] = 2;
d[7] = 5;
d[8] = 1;
d[9] = 2;
char x, y;
cin >> x >> y;
cout << d[x - '0'] * d[y - '0'];
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int a[] = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2};
int n;
cin >> n;
int x = n / 10;
int y = n % 10;
int ans = a[x] * a[y];
cout << ans;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
#pragma GCC diagnostic ignored "-Wformat"
int main() {
string s;
cin >> s;
vector<int> leadTo = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2};
cout << (leadTo[s[0] - '0'] * leadTo[s[1] - '0']) << endl;
}
|
#include <bits/stdc++.h>
using namespace std;
#pragma comment(linker, "/STACK:100000000")
int cnt[10] = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2};
int main() {
int n1, n2;
scanf("%01d%01d", &n1, &n2);
printf("%d\n", cnt[n1] * cnt[n2]);
return 0;
}
|
#include <bits/stdc++.h>
const long double eps = 1e-9;
const double pi = acos(-1.0);
const long long inf = 1e18;
using namespace std;
string str;
int a[10];
int main(int argc, const char* argv[]) {
a[0] = 1;
a[1] = 6;
a[2] = 1;
a[3] = 2;
a[4] = 2;
a[5] = 3;
a[6] = 1;
a[7] = 4;
a[8] = 0;
a[9] = 1;
cin >> str;
if (str.size() == 2) {
int ind1 = str[0] - '0';
int ind2 = str[1] - '0';
cout << 1 + a[ind1] + a[ind2] + a[ind1] * a[ind2];
return 0;
} else if (str.size() == 1) {
int ind1 = str[0] - '0';
cout << 1 + a[ind1];
return 0;
}
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, a[] = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2};
scanf("%d", &n);
printf("%d\n", a[n / 10] * a[n % 10]);
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
string s;
int a[100];
int main() {
cin >> s;
a[0] = 2;
a[1] = 7;
a[2] = 2;
a[3] = 3;
a[4] = 3;
a[5] = 4;
a[6] = 2;
a[7] = 5;
a[8] = 1;
a[9] = 2;
int ans = 1;
for (int i = 0; i < s.size(); i++) {
ans *= a[s[i] - 48];
}
cout << ans << endl;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int s, w, q, a = 0, t = 0;
cin >> s;
w = s / 10;
q = s % 10;
if (w == 0) a = 2;
if (w == 1) a = 7;
if (w == 2) a = 2;
if (w == 3) a = 3;
if (w == 4) a = 3;
if (w == 5) a = 4;
if (w == 6) a = 2;
if (w == 7) a = 5;
if (w == 8) a++;
if (w == 9) a = 2;
if (q == 0) t = 2;
if (q == 1) t = 7;
if (q == 2) t = 2;
if (q == 3) t = 3;
if (q == 4) t = 3;
if (q == 5) t = 4;
if (q == 6) t = 2;
if (q == 7) t = 5;
if (q == 8) t++;
if (q == 9) t = 2;
cout << t * a << endl;
}
|
#include <bits/stdc++.h>
const int a[10] = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2};
using namespace std;
int main() {
int n;
cin >> n;
cout << a[n % 10] * a[(n / 10) % 10] << endl;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
string c;
while (cin >> c) {
map<char, int> m;
m['0'] = 2;
m['1'] = 7;
m['2'] = 2;
m['3'] = 3;
m['4'] = 3;
m['5'] = 4;
m['6'] = 2;
m['7'] = 5;
m['8'] = 1;
m['9'] = 2;
cout << m[c[0]] * m[c[1]] << endl;
}
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
long long k, k2, i, j, q, a[111111], b[11111111], c[111111], w, r, t, n,
m[10] = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2};
string s, s2, f = "+", d1, d2;
int main() {
cin >> s;
t = m[s[0] - 48];
t *= m[s[1] - 48];
cout << t;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
;
int n;
cin >> n;
int a[] = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2};
cout << a[(n % 10)] * a[n / 10] << endl;
return 0;
}
|
#include <bits/stdc++.h>
int main() {
int n, cnt[10] = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2};
scanf("%d", &n);
printf("%d", cnt[n / 10] * cnt[n % 10]);
}
|
#include <bits/stdc++.h>
#pragma warning(disable : 4996)
using namespace std;
const int N = (int)(3e5 + 20);
const int L = 360;
const long long int M = (int)(1e9 + 7);
const double E = 1e-7;
int d[10] = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2};
int main() {
ios_base::sync_with_stdio(0);
char c1, c2;
cin >> c1 >> c2;
cout << d[c1 - '0'] * d[c2 - '0'];
}
|
#include <bits/stdc++.h>
int ngood[] = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2};
int main() {
int n;
scanf("%d", &n);
printf("%d\n", ngood[n % 10] * ngood[n / 10]);
}
|
#include <bits/stdc++.h>
using namespace std;
bool ok, ok1;
int main() {
int n, i, cnt = 0, a, b, h1, h2, j;
string w[15];
w[0] = "170";
w[1] = "1";
w[2] = "2";
w[3] = "137";
w[4] = "41";
w[5] = "5";
w[6] = "56";
w[7] = "17";
w[8] = "0123456789";
w[9] = "134975";
string s;
cin >> s;
a = s[0] - 48, b = s[1] - 48;
for (i = 0; i <= 99; i++) {
ok = 0, ok1 = 0;
for (j = 0; j < w[i % 10].size(); j++) {
if (w[i % 10][j] - 48 == b) {
ok = 1;
h1 = i % 10;
}
}
for (j = 0; j < w[i / 10].size(); j++) {
if (w[i / 10][j] - 48 == a) {
h2 = i / 10;
ok1 = 1;
}
}
if (ok1 && ok) {
cnt++;
}
}
cout << cnt;
}
|
#include <bits/stdc++.h>
using namespace std;
int a[10] = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2};
int main() {
int n;
scanf("%d", &n);
int ans = (a[n % 10]) * (a[(n / 10) % 10]);
printf("%d\n", ans);
}
|
#include <bits/stdc++.h>
using namespace std;
int mark[15] = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2};
int main() {
int i, len, j, k, n, m;
char a[100];
scanf("%s", a);
len = strlen(a);
int s = 1;
for (i = 0; i < len; i++) {
s *= mark[a[i] - '0'];
}
printf("%d\n", s);
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
double PI = 3.1415926535897932384626433832795;
int arr[101];
void fun() {
arr['0'] = 2;
arr['1'] = 7;
arr['2'] = 2;
arr['3'] = 3;
arr['4'] = 3;
arr['5'] = 4;
arr['6'] = 2;
arr['7'] = 5;
arr['8'] = 1;
arr['9'] = 2;
}
int main() {
string s;
cin >> s;
int ans = 0;
fun();
cout << arr[s[0]] * arr[s[1]];
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
string val[10];
bool ok(int a, int b) {
for (int i = 0; i < 7; ++i)
if (val[a][i] < val[b][i]) return false;
return true;
}
int main() {
val[0] = "1110111";
val[1] = "0010010";
val[2] = "1011101";
val[3] = "1011011";
val[4] = "0111010";
val[5] = "1101011";
val[6] = "1101111";
val[7] = "1010010";
val[8] = "1111111";
val[9] = "1111011";
string n;
cin >> n;
int a = n[0] - '0', b = n[1] - '0', ans = 0;
for (int i = 0; i <= 99; ++i) {
ans += ok(i / 10, a) && ok(i % 10, b);
}
cout << ans << '\n';
}
|
#include <bits/stdc++.h>
int arr[10][10] = {{1, 1, 1, 1, 1, 1, 0}, {0, 1, 1, 0, 0, 0, 0},
{1, 1, 0, 1, 1, 0, 1}, {1, 1, 1, 1, 0, 0, 1},
{0, 1, 1, 0, 0, 1, 1}, {1, 0, 1, 1, 0, 1, 1},
{1, 0, 1, 1, 1, 1, 1}, {1, 1, 1, 0, 0, 0, 0},
{1, 1, 1, 1, 1, 1, 1}, {1, 1, 1, 1, 0, 1, 1}};
int devolve(int n) {
int count = 0;
for (int i = 0; i < 10; i++) {
count++;
for (int j = 0; j < 10; j++)
if (arr[n][j] == 1 && arr[i][j] == 0) {
count--;
break;
}
}
return count;
}
int main(void) {
char x, y;
scanf("%c", &x);
scanf("%c", &y);
x -= '0';
y -= '0';
printf("%d\n", devolve(x) * devolve(y));
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
const int N = 700 + 50;
const int mo = 1e9 + 7;
string ss;
int f[] = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2};
int n, m;
int main() {
char s[10];
scanf("%s", s);
int x = s[0] - '0';
int y = s[1] - '0';
int ans = (f[x] * f[y]);
printf("%d", ans);
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
int x = s[0] - 48;
int y = s[1] - 48;
int ctr1 = 0;
int ctr2 = 0;
int total = 1;
if (x == 0) {
ctr1 = 2;
} else if (x == 1) {
ctr1 = 7;
} else if (x == 2) {
ctr1 = 2;
} else if (x == 3) {
ctr1 = 3;
} else if (x == 4) {
ctr1 = 3;
} else if (x == 5) {
ctr1 = 4;
} else if (x == 6) {
ctr1 = 2;
} else if (x == 7) {
ctr1 = 5;
} else if (x == 8) {
ctr1 = 1;
} else if (x == 9) {
ctr1 = 2;
}
total = total * ctr1;
x = y;
ctr1 = 0;
if (x == 0) {
ctr1 = 2;
} else if (x == 1) {
ctr1 = 7;
} else if (x == 2) {
ctr1 = 2;
} else if (x == 3) {
ctr1 = 3;
} else if (x == 4) {
ctr1 = 3;
} else if (x == 5) {
ctr1 = 4;
} else if (x == 6) {
ctr1 = 2;
} else if (x == 7) {
ctr1 = 5;
} else if (x == 8) {
ctr1 = 1;
} else if (x == 9) {
ctr1 = 2;
}
total = total * ctr1;
cout << total;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int a[10] = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2}, k = 1, i;
string s;
cin >> s;
if (s.size() == 1) s = '0' + s;
for (i = 0; i < s.size(); i++) k *= a[s[i] - '0'];
cout << k << endl;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int answer(int number) {
int x[2], y, t, i = 0, count = 2;
while (count--) {
y = number % 10;
number /= 10;
if (y == 8)
x[i++] = 1;
else if (y == 3 || y == 4)
x[i++] = 3;
else if (y == 0 || y == 2 || y == 6 || y == 9)
x[i++] = 2;
else if (y == 1)
x[i++] = 7;
else if (y == 7)
x[i++] = 5;
else if (y == 5)
x[i++] = 4;
}
return x[0] * x[1];
}
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int n;
cin >> n;
cout << answer(n) << endl;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
map<int, int> m;
m[0] = 1;
m[1] = 6;
m[2] = 1;
m[3] = 2;
m[4] = 2;
m[5] = 3;
m[6] = 1;
m[7] = 4;
m[8] = 0;
m[9] = 1;
int n;
cin >> n;
int x = n % 10;
n = n / 10;
cout << (m[x] + 1) * (m[n] + 1) << endl;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int arr[] = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2};
string str;
cin >> str;
cout << (arr[str[0] - '0'] * arr[str[1] - '0']) << endl;
return 0;
}
|
#include <bits/stdc++.h>
int main() {
int d[] = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2}, x;
std::cin >> x;
std::cout << d[x / 10] * d[x % 10];
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int detectNum(int a) {
if (a == 0) return 2;
if (a == 1) return 7;
if (a == 2) return 2;
if (a == 3) return 3;
if (a == 4) return 3;
if (a == 5) return 4;
if (a == 6) return 2;
if (a == 7) return 5;
if (a == 8) return 1;
if (a == 9) return 2;
}
int main() {
int m, x, y;
cin >> m;
x = m / 10;
y = (m - x * 10);
cout << detectNum(x) * detectNum(y);
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
char a, b;
cin >> a >> b;
int x, y, d[10] = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2};
x = a - 48;
y = b - 48;
int res = d[x] * d[y];
cout << res;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
map<char, int> m;
m['0'] = 2;
m['1'] = 7;
m['2'] = 2;
m['3'] = 3;
m['4'] = 3;
m['5'] = 4;
m['6'] = 2;
m['7'] = 5;
m['8'] = 1;
m['9'] = 2;
string s;
cin >> s;
cout << m[s[0]] * m[s[1]];
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int d[11] = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2}, i, ans = 1;
string s;
cin >> s;
for (i = 0; s[i]; ++i) ans *= d[s[i] - 48];
cout << ans;
}
|
#include <bits/stdc++.h>
using namespace std;
int vis[] = {1, 6, 1, 2, 2, 3, 1, 4, 0, 1};
int main() {
string s;
cin >> s;
int a = s[0] - '0', b = s[1] - '0';
cout << (vis[a] + 1) * (vis[b] + 1);
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int n = 0;
int d[2] = {0}, p[2] = {0};
cin >> n;
d[0] = n % 10;
d[1] = n / 10;
for (int i = 0; i <= 2; i++) {
if (d[i] == 8) p[i] = 1;
if (d[i] == 0 || d[i] == 2 || d[i] == 6 || d[i] == 9) p[i] = 2;
if (d[i] == 3 || d[i] == 4) p[i] = 3;
if (d[i] == 5) p[i] = 4;
if (d[i] == 7) p[i] = 5;
if (d[i] == 1) p[i] = 7;
}
cout << p[0] * p[1];
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int m, arr[] = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2};
cin >> m;
cout << arr[m % 10] * arr[m / 10] << endl;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int arr[20], num, ans;
arr[1] = 7;
arr[2] = 2;
arr[3] = arr[4] = 3;
arr[5] = 4;
arr[6] = 2;
arr[7] = 5;
arr[8] = 1;
arr[9] = arr[0] = 2;
cin >> num;
ans = arr[num % 10];
num /= 10;
ans *= arr[num];
cout << ans;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 1001;
int main() {
int a[10];
a[0] = 2;
a[1] = 7;
a[2] = 2;
a[3] = 3;
a[4] = 3;
a[5] = 4;
a[6] = 2;
a[7] = 5;
a[8] = 1;
a[9] = 2;
int o = 1;
char c;
while (cin >> c) o *= a[c - '0'];
cout << o << '\n';
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
int a[10] = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2};
cout << a[s[0] - '0'] * a[s[1] - '0'];
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
long ar[] = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2};
int main() {
string s;
cin >> s;
cout << ar[s[0] - '0'] * ar[s[1] - '0'] << endl;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
int a[10];
a[0] = 2;
a[1] = 7;
a[2] = 2;
a[3] = 3;
a[4] = 3;
a[5] = 4;
a[6] = 2;
a[7] = 5;
a[8] = 1;
a[9] = 2;
if (n % 10 == n % 100) {
cout << a[n % 10] * 2;
} else {
cout << a[n % 10] * a[n / 10];
}
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, i = 1;
cin >> n;
if (n % 10 == 0) {
i *= 2;
}
if (n % 10 == 1) {
i *= 7;
}
if (n % 10 == 2) {
i *= 2;
}
if (n % 10 == 3) {
i *= 3;
}
if (n % 10 == 4) {
i *= 3;
}
if (n % 10 == 5) {
i *= 4;
}
if (n % 10 == 6) {
i *= 2;
}
if (n % 10 == 7) {
i *= 5;
}
if (n % 10 == 8) {
i *= 1;
}
if (n % 10 == 9) {
i *= 2;
}
if (n / 10 == 0) {
i *= 2;
}
if (n / 10 == 1) {
i *= 7;
}
if (n / 10 == 2) {
i *= 2;
}
if (n / 10 == 3) {
i *= 3;
}
if (n / 10 == 4) {
i *= 3;
}
if (n / 10 == 5) {
i *= 4;
}
if (n / 10 == 6) {
i *= 2;
}
if (n / 10 == 7) {
i *= 5;
}
if (n / 10 == 8) {
i *= 1;
}
if (n / 10 == 9) {
i *= 2;
}
cout << i << endl;
}
|
#include <bits/stdc++.h>
using namespace std;
int v[10] = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2};
int main() {
int ans = 1;
for (int i = 0; i < 2; i++) {
char c;
cin >> c;
ans *= (v[c - '0']);
}
cout << ans;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int c[10] = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2};
int main() {
int n;
cin >> n;
int ans;
ans = c[n % 10] * c[n / 10];
cout << ans << "\n";
return 0;
}
|
#include <bits/stdc++.h>
int digit[10][7] = {{1, 1, 1, 1, 1, 1, 0}, {0, 1, 1, 0, 0, 0, 0},
{1, 1, 0, 1, 1, 0, 1}, {1, 1, 1, 1, 0, 0, 1},
{0, 1, 1, 0, 0, 1, 1}, {1, 0, 1, 1, 0, 1, 1},
{1, 0, 1, 1, 1, 1, 1}, {1, 1, 1, 0, 0, 0, 0},
{1, 1, 1, 1, 1, 1, 1}, {1, 1, 1, 1, 0, 1, 1}};
int temp[2][7];
void Initialise_temp(char *st) {
for (int i = 0; i < 7; i++) {
temp[0][i] = digit[st[0] - '0'][i];
}
for (int i = 0; i < 7; i++) {
temp[1][i] = digit[st[1] - '0'][i];
}
}
int count() {
int c1 = 0;
for (int i = 0; i < 10; i++) {
int flag = 1;
for (int j = 0; j < 7 && (flag == 1); j++) {
if ((temp[0][j] == 1)) {
if (digit[i][j] == 0) flag = 0;
}
}
c1 = c1 + flag;
}
int c2 = 0;
for (int i = 0; i < 10; i++) {
int flag = 1;
for (int j = 0; j < 7 && (flag == 1); j++) {
if ((temp[1][j] == 1)) {
if (digit[i][j] == 0) flag = 0;
}
}
c2 = c2 + flag;
}
return c1 * c2;
}
int main() {
char *st = (char *)calloc(4, sizeof(char));
scanf("%s", st);
Initialise_temp(st);
printf("%d", count());
}
|
#include <bits/stdc++.h>
using namespace std;
int digit[10][7] = {{true, true, true, true, true, true, false},
{false, true, true, false, false, false, false},
{true, true, false, true, true, false, true},
{true, true, true, true, false, false, true},
{false, true, true, false, false, true, true},
{true, false, true, true, false, true, true},
{true, false, true, true, true, true, true},
{true, true, true, false, false, false, false},
{true, true, true, true, true, true, true},
{true, true, true, true, false, true, true}};
class Digit {
public:
bool d[7];
bool f[10];
int rv;
Digit(int n) {
memset(f, false, sizeof(f));
for (int i = 0; i < 7; i++) {
d[i] = digit[n][i];
}
}
void search(int i) {
if (i == 7) {
bool found;
for (int i = 0; i < 10; i++) {
found = true;
for (int j = 0; j < 7; j++) {
if (d[j] != digit[i][j]) {
found = false;
break;
}
}
if (found) {
if (!f[i]) {
rv++;
f[i] = true;
}
break;
}
}
return;
}
if (!d[i]) {
d[i] = true;
search(i + 1);
d[i] = false;
}
search(i + 1);
}
};
char c[2];
int main() {
cin >> c[0] >> c[1];
Digit d1(c[0] - '0'), d2(c[1] - '0');
d1.rv = d2.rv = 0;
d1.search(0);
d2.search(0);
cout << d1.rv * d2.rv << endl;
return 0;
}
|
#include <bits/stdc++.h>
inline long long Power(int b, int p) {
long long ret = 1;
for (int i = 1; i <= p; i++) ret *= b;
return ret;
}
long long gcd(long long a, long long b) {
long long r = 0;
while (b != 0) {
r = b;
b = a % r;
a = r;
}
return a;
}
using namespace std;
int main() {
int v[10] = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2};
char a, b;
cin >> a >> b;
cout << v[a - '0'] * v[b - '0'] << endl;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int a[10] = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2};
int x;
scanf("%d", &x);
x = a[x / 10] * a[x % 10];
printf("%d\n", x);
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, a, b, t, q;
cin >> n;
a = 0;
b = 0;
t = n % 10;
q = n / 10;
if (t == 0 || t == 6 || t == 9)
a = 2;
else if (t == 1)
a = 7;
else if (t == 2)
a = 2;
else if (t == 3 || t == 4)
a = 3;
else if (t == 5)
a = 4;
else if (t == 7)
a = 5;
else if (t == 8)
a = 1;
if (q == 0 || q == 6 || q == 9)
b = 2;
else if (q == 1)
b = 7;
else if (q == 2)
b = 2;
else if (q == 3 || q == 4)
b = 3;
else if (q == 5)
b = 4;
else if (q == 7)
b = 5;
else if (q == 8)
b = 1;
cout << a * b;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int k[10] = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2};
int main(void) {
int n;
scanf("%d", &n);
int x = n / 10, y = n % 10;
printf("%d\n", k[x] * k[y]);
}
|
#include <bits/stdc++.h>
using namespace std;
void process() {
int a[] = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2};
int n;
cin >> n;
cout << a[n % 10] * a[n / 10] << endl;
}
int main(void) {
process();
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
const double EPS = 10e-12;
int n, n1, n2;
int dig[10] = {
(1 << (1)) | (1 << (2)) | (1 << (3)) | (1 << (5)) | (1 << (6)) | (1 << (7)),
(1 << (3)) | (1 << (6)),
(1 << (1)) | (1 << (3)) | (1 << (4)) | (1 << (5)) | (1 << (7)),
(1 << (1)) | (1 << (3)) | (1 << (4)) | (1 << (6)) | (1 << (7)),
(1 << (2)) | (1 << (3)) | (1 << (4)) | (1 << (6)),
(1 << (1)) | (1 << (2)) | (1 << (4)) | (1 << (6)) | (1 << (7)),
(1 << (1)) | (1 << (2)) | (1 << (5)) | (1 << (4)) | (1 << (6)) | (1 << (7)),
(1 << (1)) | (1 << (3)) | (1 << (6)),
(1 << (1)) | (1 << (2)) | (1 << (3)) | (1 << (4)) | (1 << (5)) |
(1 << (6)) | (1 << (7)),
(1 << (1)) | (1 << (2)) | (1 << (3)) | (1 << (4)) | (1 << (6)) | (1 << (7)),
};
int main() {
ios::sync_with_stdio(false);
cin >> n;
n1 = n / 10;
n2 = n % 10;
int a, b;
a = b = 0;
for (int i = 0; i < 10; i++) {
if (((dig[n1]) & dig[i]) == dig[n1]) {
a++;
}
if (((dig[n2]) & dig[i]) == dig[n2]) {
b++;
}
}
cout << a * b << '\n';
}
|
#include <bits/stdc++.h>
int main() {
int n, a, b;
scanf("%d", &n);
switch (n % 10) {
case 0:
a = 2;
break;
case 1:
a = 7;
break;
case 2:
a = 2;
break;
case 3:
a = 3;
break;
case 4:
a = 3;
break;
case 5:
a = 4;
break;
case 6:
a = 2;
break;
case 7:
a = 5;
break;
case 8:
a = 1;
break;
case 9:
a = 2;
break;
}
switch ((n - (n % 10)) / 10) {
case 0:
b = 2;
break;
case 1:
b = 7;
break;
case 2:
b = 2;
break;
case 3:
b = 3;
break;
case 4:
b = 3;
break;
case 5:
b = 4;
break;
case 6:
b = 2;
break;
case 7:
b = 5;
break;
case 8:
b = 1;
break;
case 9:
b = 2;
break;
}
printf("%d\n", a * b);
return 0;
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.