Sunteți pe pagina 1din 4

a, b, n; L, L3; S = 0, p; << A × B C

<< A<< >> a; << B<<

>> b; (int = 0; < n; ++)

<<

{

 

p = pow(2, i);

L

= a/p;

if

÷

{

L3 = b p;

S

= S + L3;

if

(L == 1)

{

<< << S <<

}

}

}

 

return0;

}

× n, m ∈ ℵ

n × m

n m

n × m = n m

1) n = 1

n × m = 1 × m = m

n

n m = 1 m

1 m = m

n = 1 2) n = k k ∈ ℵ

[k/2] × 2m = [k/2] 2m

[ ]

k m = [k/2] 2m + x

x x = m x = 0

k × m = [k/2] × 2m + x

x x = m x = 0

[k/2] × 2m = [k/2] 2m

n k

k × m = k m

3) n = k + 1 k ∈ ℵ

(k + 1) m = [(k + 1)/2] 2m + x

x = m k + 1 k x = 0 k + 1 k k k m x = 0

k m = [k/2] 2m

n = k + 1 (k + 1) m x [(k + 1)/2] = (k + 1)/2

(k + 1) m = k m + 1 m = k m + m

(k + 1) × m = k × m + m

(k + 1) m = k m + m = k × m + m = (k + 1) × m

k

k × m = k m

k ∈ ℵ

n × m = n m

n, m ∈ ℵ