x
2
+
y
2
=
16
...
...
...
...
...
...
.
.
(
1
)
x + y = 4 (2)
rearrange (2) to y = 4 - x (could do x = 4 - y )
substitute y = 4 - x into (1)
hence:
x
2
+
(
4
−
x
)
2
=
16
⇒
x
2
+
16
−
8
x
+
x
2
=
16
and
2
x
2
−
8
x
+
16
−
16
=
0
⇒
2
x
2
−
8
x
=
0
factor and solve : 2x(x - 4 ) = 0
⇒
x
=
0
,
x
=
4
substitute these values into y = 4 - x , to find corresponding values of y.
x = 0 : y = 4 - 0 = 4 → (0 , 4)
x = 4 : y = 4 - 4 = 0 → (4 , 0 )
These are the points of intersection with the line x +y = 4 and the circle
x
2
+
y
2
=
16
Answer link
Объяснение:
#include <iostream>
#include <vector>
using namespace std;
void solve1(){
const int N = 7, X = 6;
int cnt = 0;
vector<int> a(N);
for(auto &i: a) cin >> i;
for(auto &i: a) cnt += (i > X);
cout << cnt;
}
void solve2(){
const int N = 12;
int res = 1;
vector<int> p(N);
for(auto &i: p) cin >> i;
for(auto &i: p)
if(!(i & 1))
res *= i;
(res == 1) ? cout << 0 : cout << res;
}
void solve3(){
const int N = 17;
int x, ans = 0;
vector<int> t(N);
for(auto &i: t) cin >> i;
cin >> x;
while(++x < N)
ans += t[x];
cout << ans;
}
int main(){
//solve1(); //task1
//solve2(); //task2
//solve3(); //task3
}
N = int(input())
for i in range(1, N+1):
print('Я люблю программирование!')