![](https://rs.olm.vn/images/avt/0.png?1311)
Hãy nhập câu hỏi của bạn vào đây, nếu là tài khoản VIP, bạn sẽ được ưu tiên trả lời.
![](https://rs.olm.vn/images/avt/0.png?1311)
![](https://rs.olm.vn/images/avt/0.png?1311)
#include <bits/stdc++.h>
using namespace std;
long long a[10000],n,i;
int main()
{
cin>>n;
for (i=1; i<=n; i++)
cin>>a[i];
sort(a+1,a+n+1);
for (i=n; i>=1; i--) cout<<a[i]<<" ";
return 0;
}
![](https://rs.olm.vn/images/avt/0.png?1311)
#include <bits/stdc++.h>
using namespace std;
int n,s,i,t;
int main()
{
freopen("bai1.inp","r",stdin);
freopen("bai1.out","w",stdout);
cin>>n>>s;
t=0;
for (int i=1; i<=n; i++)
{
int x;
cin>>x;
if (x%s==0) t+=x;
}
cout<<t;
}
![](https://rs.olm.vn/images/avt/0.png?1311)
#include <bits/stdc++.h>
using namespace std;
long long n,i,dem,a[10000];
//chuongtrinhcon
bool ktnt(long long n)
{
for (int i=2; i*i<=n; i++)
if (n%i==0) return(false);
return(true);
}
//chuongtrinhchinh
int main()
{
cin>>n;
dem=0;
for (i=1; i<=n; i++)
{
cin>>a[i];
if (a[i]>1 && (ktnt(a[i])==true)) dem++;
}
cout<<dem;
return 0;
}
![](https://rs.olm.vn/images/avt/0.png?1311)
uses crt;
var a:array[1..100]of integer;
i,n:integer;
begin
clrscr;
randomize;
write('Nhap n='); readln(n);
for i:=1 to n do
a[i]:=random(100);
for i:=1 to n do
write(a[i]:4);
readln;
end.
![](https://rs.olm.vn/images/avt/0.png?1311)
uses crt;
var i,n,n,d; integer;
A: array[1..32000] of integer;
begin
clrscr;
readln(n);
for i:=1 to n do
readln(a[i]);
readln(m);
for i:=1 to n do
if a[i] = m then d:=d+1;
write(d);
readln;
end.