-
Notifications
You must be signed in to change notification settings - Fork 0
/
REFLECTIVE.cpp
127 lines (118 loc) · 2.63 KB
/
REFLECTIVE.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
#define read freopen("input.txt", "r", stdin)
#define write freopen("output.txt", "w", stdout)
#define pb push_back
#define ll long long
#define ull unsigned long long
#define ld long double
#define pii pair<int, int>
#define vi vector<int>
#define vii vector<pii>
#define mpi map<int, int>
#define si set<int>
#define vt vector
#define getline cout << '\n'
#define all(x) x.begin(), x.end()
#define FOR(i, a, b) for (long long int i = a; (b - i) * (a - i) <= 0 && (b > a ? b != i : b != a); b > a ? i++ : i--)
#define FOREACHR(it, m) for (auto it = m.rbegin(); it != m.rend(); it++)
#define FOREACH(it, m) for (auto it = m.begin(); it != m.end(); it++)
// #define FOREACH(it, m) for (auto it : m)
// #define IOS ios_base::sync_with_stdio(false)
#define scanset(s, n) \
FOR(i, 0, n) \
{ \
int x; \
cin >> x; \
s.insert(x); \
}
template <class T, size_t size>
// scan array
void scan(T (&array)[size])
{
for (size_t i = 0; i < size; ++i)
cin >> array[i];
}
template <class T, size_t size>
// print array
void print(const T (&array)[size])
{
for (size_t i = 0; i < size; ++i)
cout << array[i] << " ";
}
template <class T, size_t size>
void println(const T (&array)[size])
{
print(array);
cout << endl;
}
template <class T>
// scan vector with size
void scan(T &x)
{
for (size_t i = 0; i < x.size(); i++)
{
cin >> x[i];
}
}
template <class T>
// print vector
void print(const T &t)
{
for (size_t i = 0; i < t.size(); i++)
cout << t[i] << " ";
}
template <class T>
void println(const T &t)
{
print(t);
cout << endl;
}
template <class T>
// print vector, set, ...
void __print_collection(T const &container)
{
for (auto pos : container)
cout << pos << " ";
}
// int main()
// {
// long double l, r;
// long long int lf, rf;
// cin >> l >> r;
// long long int res = 0;
// long long int i = 2;
// while (r - l >= i)
// {
// rf = floor(r / i);
// lf = ceil(l / i);
// res += rf - lf + 1;
// i <<= 1;
// }
// cout << res;
// }
int main(int argc, char const *argv[])
{
string a;
cin >> a;
a += "a";
int i = 0;
int r = 1;
for (int j = 0; j < a.size(); j++)
{
if (int(a[j]) >= 48 && int(a[j]) <= 57)
{
i = i * 10 + int(a[j]) - 48;
}
else if (i != 0)
{
r *= i;
i = 0;
}
}
cout << r;
return 0;
}