#include <iostream>
#include <cmath>
using namespace std;
int main (void)
{
int n, m;
cin >> n >> m;
double E = 0;
for (int i = 1; i <= n; i++) {
double P = 1;
for (int j = 1; j <= m; j++) {
if (j % 3) // ;
continue;
P *= j - i;
}
E += P;
}
cout << E << endl;
return 0;
}
2.3.
2.3.1.
, if else, switch . x .
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
2.3.2.
, for, while, do while. n .
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
2.3.3.
, for, while, do while. n m .
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
3. . .
++ : heap stack. . , , . , , , . . . heap . , , , (static). heap , .
3.1.
++ : , . , , .
|
|
, . , , . void , . , .
: & *, . & , * , . new delete, malloc() free(). .