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.
#include <bits/stdc++.h>
using namespace std;
long long n,i;
bool kt;
int main()
{
cin>>n;
kt=true;
for (i=2; i*i<=n; i++)
if (n%i==0) kt=false;
if ((kt==true) and (n>1)) cout<<"YES";
else cout<<"NO";
return 0;
}
#include <bits/stdc++.h>
using namespace std;
string st;
int d,i;
bool kt;
int main()
{
getline(cin,st);
kt=true;
d=st.length();
for (i=0; i<=d-1; i++)
if (st[i]!=st[d-i-1]) kt=false;
if (kt==true) cout<<"YES";
else cout<<"NO";
return 0;
}
var n,i,dem,t:integer;
a:array[1..50] of integer;
begin
dem:=0;
t:=0;
read(n);
for i:=1 to n do
read(a[i]);
for i:=n downto 1 do
write(a[i]);
writeln;
for i:=1 to n do
if (a[i] mod 2 = 0) then dem:=dem+1;
if a[i]<a[i-1] then t:=t+1;
writeln(dem);
if t=0 then write('Co lap thanh cap so +')
else write('Ko the lap thanh cap so +');
readln;
end.
uses crt;
var i,n,s: integer;
a:array[1..100] of integer;
begin
writeln('Nhap n: '); read(n);
for i:=1 to n do
begin
write('a[',i,'] = '); readln(a[i]);
end;
writeln('Cac so le: ')
s:=0;
for i:=1 to n do
if a[i] mod 2 <> 0 then
begin
s:=s+a[i];
write(a[i],' ');
end;
writeln('- Tong so le: ',s);
for i:=1 to trunc(sqrt(s)) do if s mod i = 0 then d:=d+1;
if d > 1 then writeln('Tong do khong la so nguyen to') else writeln('Tong do la so nguyen to');
readln
end.
#include <bits/stdc++.h>
using namespace std;
long long n,i;
bool kt;
int main()
{
freopen("checknto.inp","r",stdin);
freopen("checknto.out","w",stdout);
cin>>n;
kt=true;
for (i=2; i*i<=n; i++)
if (n%i==0) kt=false;
if (kt==true && n>1) cout<<"YES";
else cout<<"NO";
return 0;
}
program im_14424;
uses crt;
var m: interger;
begin
clrscr;
write('Nhap vap so nguyen duong m: ');
readln(m);
if m>0 and m mod 2 = 0 then write('So nguyen duong m la so chan');
if m>0 and m mod 2 <> 0 then write('So nguyen duong m la so le);
if m<0 then write('m khum phai la so nguyen duong');
readln
end.
#include <bits/stdc++.h>
using namespace std;
string st;
int d,i;
bool kt;
int main()
{
cin>>st;
d=st.length();
kt=true;
for (i=0; i<=d-1; i++)
if ((st[i]!='6') and (st[i]!='8')) kt=false;
if (kt==true) cout<<"YES";
else cout<<"NO";
return 0;
}