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;
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;
}
#include <bits/stdc++.h>
using namespace std;
string st;
int d,i,dem;
int main()
{
freopen("xau.inp","r",stdin);
freopen("xau.out","w",stdout);
cin>>st;
d=st.length();
dem=0;
for (i=0; i<=d-1; i++)
if (st[i]=='a') dem++;
cout<<dem;
return 0;
}
Program HOC24;
var m,i,n: longint;
d1,d2,d3: integer;
function dx(x: longint): boolean;
var j: longint;
s,s1: string;
begin
s1:=''; dx:=false;
str(x,s);
for j:=length(s) downto 1 do
s1:=s1+s[j];
if s=s1 then dx:=true else exit;
end;
function cp(k: longint): boolean;
begin
cp:=false;
if k=sqr(trunc(sqrt(k))) then cp:=true else exit;
end;
begin
write('Nhap M; N: '); readln(m,n);
d1:=0; d2:=0; d3:=0;
if (m<n) and (m>=10) and (n<=100000) then
begin
write('Cac so doi xung la: ');
for i:=m to n do
if dx(i) then
begin
d1:=d1+1;
write(i,' ');
end;
writeln;
writeln('Co ',d1,' so doi xung');
write('Cac so chinh phuong la: ');
for i:=m to n do
if cp(i) then
begin
d2:=d2+1;
write(i,' ');
end;
writeln;
writeln('Co ',d2,' so chinh phuong');
write('Cac so doi xung chinh phuong la: ');
for i:=m to n do
if dx(i) and cp(i) then
begin
d3:=d3+1;
write(i,' ');
end;
writeln;
write('Co ',d3,' so doi xung chinh phuong');
end;
readln
end.
const fi='tong.inp';
fo='tong.out';
var f1,f2:text;
a:array[1..100]of integer;
n,i,t:integer;
begin
assign(f1,fi); reset(f1);
assign(f2,fo); rewrite(f2);
readln(f1,n);
for i:=1 to n do
read(f1,a[i]);
t:=0;
for i:=1 to n do
t:=t+a[i];
writeln(f2,t);
close(f1);
close(f2);
end.
const fi='songuyen.dat';
fo='ketqua.dat';
var f1,f2:text;
a:array[1..100]of integer;
i,n,s,ln:integer;
begin
assign(f1,fi); reset(f1);
assign(f2,fo); rewrite(f2);
readln(f1,n);
for i:=1 to n do
read(f1,a[i]);
s:=1;
ln:=a[1];
for i:=1 to n do
begin
s:=s*a[i];
if ln<a[i] then ln:=a[i];
end;
writeln(f2,s);
writeln(f2,ln);
close(f1);
close(f2);
end.
#include <bits/stdc++.h>
using namespace std;
long long a,b;
int main()
{
freopen("sn.inp","r",stdin);
freopen("cn.out","w",stdout);
cin>>a>>b;
cout<<a*b;
return 0;
}
..................