#include <iostream>
#include <cmath>
using namespace std;
signed main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int n;
cin >> n;
int ans = 0;
int a[n],b[n];
for(int i = 0; i < n; i++)
cin >> a[i];
for(int i = 0; i < n; i++)
cin >> b[i];
for(int i = 0; i < n; i++)
if(a[i] > b[i])
ans++;
cout << ans;
}
P.S что было сложно или непонятно, задача ну очень простая, на реализацию
#include <iostream>
#include <cmath>
using namespace std;
signed main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int n;
cin >> n;
int ans = 0;
int a[n],b[n];
for(int i = 0; i < n; i++)
cin >> a[i];
for(int i = 0; i < n; i++)
cin >> b[i];
for(int i = 0; i < n; i++)
if(a[i] > b[i])
ans++;
cout << ans;
}
P.S что было сложно или непонятно, задача ну очень простая, на реализацию
const n=10;
var a: array[1..n] of integer;
i: integer;
p: real;
begin
randomize;
writeln('исходный массив:');
p:=1;
for i:=1 to n do
begin
a[i]:=random(15)+1;
write(a[i],' ');
p:=p*a[i];
end;
writeln;
writeln('полупроизведение: ',p/2);
end.