SlideShare a Scribd company logo
1 of 3
Download to read offline
Решение городской олимпиады программирование 10-11 класс
1. Степень симметрии
var n:string;
k,i:integer;
begin
readln(n);
if length(n) mod 2=0 then k:=0 else k:=1;
for i:=1 to length(n) div 2 do
if n[i]=n[length(n)+1-i] then k:=k+1;
writeln(k);
end. //100%
var n1,n,ch,zif,k,raz:int64;
i:integer;
begin
readln(n);
ch:=0;
n1:=n;
raz:=0;
while n<>0 do
begin
zif:=n mod 10;
n:=n div 10;
ch:=ch*10+zif;
raz:=raz+1;
end;
//writeln('raz=',raz);
if (raz mod 2=1) or (n1=0) then k:=1 else k:=0;
for i:=1 to raz div 2 do
begin
if n1 mod 10 =ch mod 10 then k:=k+1;
n1:=n1 div 10;
ch:=ch div 10;
end;
writeln(k);
end. //100%
2. Счастливые билеты
var n,i1,i2,i3,i4,i5,i6,k:integer;
begin
readln(n);
k:=0;
for i1:=0 to 9 do
for i2:=0 to 9 do
for i3:=0 to 9 do
for i4:=0 to 9 do
for i5:=0 to 9 do
for i6:=0 to 9 do
if (i1+i2+i3=i4+i5+i6) and (i1+i2+i3=n) then k:=k+1;
writeln(k);
end. //100%
3. Разница в зарплате
var max,min,a,raz:real;
i:integer;
begin
read(a);
max:=a; min:=a;
while not eoln do
begin
read(a);
if max<a then max:=a;
if min>a then min:=a;
end;
raz:=max-min;
writeln(raz:0:2);
end. //100%
4. Шарики
var a,i,n,s,max,kol:longint;
sh:array[1..9] of longint;
begin
readln(n);
for i:=1 to 9 do sh[i]:=0;
for i:=1 to n do
begin
read(a);
sh[a]:=sh[a]+1;
end;
s:=sh[1];
max:=sh[1];
for i:=2 to 9 do
begin
s:=s+sh[i];
if max<sh[i] then max:=sh[i];
end;
kol:=s-max;
writeln(kol);
end.//100%
5. Распаковка строчки
var s,z:ansistring; //string 75%
i,k,t,c:integer;
begin
Readln(z); s:='';
z:=z+'0';
while z[1]<>'0' do
begin
if z[1] in ['1'..'9'] then
begin
k:=1;
if z[2] in ['0'..'9'] then k:=2;
Val(Copy(z,1,k),t,c);
for i:=1 to t do s:=s+z[k+1];
Delete(z,1,k+1);
end
else
begin
s:=s+z[1];
Delete(z,1,1);
end;
end;
while Length(s)>40 do
begin
writeln(Copy(s,1,40));
Delete(s,1,40);
end;
Writeln(s);
end. //100% тестов

More Related Content

Viewers also liked

Gestión Pública y Políticas Públicas en Salud (II): ¿Reforma o Modernización?.
Gestión Pública  y Políticas Públicas en Salud (II): ¿Reforma o Modernización?.Gestión Pública  y Políticas Públicas en Salud (II): ¿Reforma o Modernización?.
Gestión Pública y Políticas Públicas en Salud (II): ¿Reforma o Modernización?.Gobernaphenom
 
Calidad del gasto y gestión pública: Fijando el curso.
Calidad del gasto y gestión pública: Fijando el curso.Calidad del gasto y gestión pública: Fijando el curso.
Calidad del gasto y gestión pública: Fijando el curso.Gobernaphenom
 
De nuevo, el SNIP: ¿Los “Duros” también lloran?.
De nuevo, el SNIP: ¿Los “Duros” también lloran?.De nuevo, el SNIP: ¿Los “Duros” también lloran?.
De nuevo, el SNIP: ¿Los “Duros” también lloran?.Gobernaphenom
 
Moodle Themes Samples
Moodle Themes SamplesMoodle Themes Samples
Moodle Themes SamplesParadiso LMS
 
Ambiente Moodle - Apectos técnicos e Pedagógicos
Ambiente Moodle - Apectos técnicos e Pedagógicos Ambiente Moodle - Apectos técnicos e Pedagógicos
Ambiente Moodle - Apectos técnicos e Pedagógicos Dirce Cristiane Camilotti
 
Informe Técnico 03 Notificações de Receita B e B2
Informe Técnico 03  Notificações de Receita B e B2Informe Técnico 03  Notificações de Receita B e B2
Informe Técnico 03 Notificações de Receita B e B2Farmacêutico Digital
 
The Future of the Web - Cold Front conference 2016
The Future of the Web - Cold Front conference 2016The Future of the Web - Cold Front conference 2016
The Future of the Web - Cold Front conference 2016Robert Nyman
 

Viewers also liked (13)

Polymers, Al-Ebdaa Group , “ Desalination ” ,IDM8
Polymers, Al-Ebdaa Group ,  “ Desalination ” ,IDM8Polymers, Al-Ebdaa Group ,  “ Desalination ” ,IDM8
Polymers, Al-Ebdaa Group , “ Desalination ” ,IDM8
 
Rosas
RosasRosas
Rosas
 
GLUTACAL PREMIUM
GLUTACAL PREMIUMGLUTACAL PREMIUM
GLUTACAL PREMIUM
 
Gestión Pública y Políticas Públicas en Salud (II): ¿Reforma o Modernización?.
Gestión Pública  y Políticas Públicas en Salud (II): ¿Reforma o Modernización?.Gestión Pública  y Políticas Públicas en Salud (II): ¿Reforma o Modernización?.
Gestión Pública y Políticas Públicas en Salud (II): ¿Reforma o Modernización?.
 
Calidad del gasto y gestión pública: Fijando el curso.
Calidad del gasto y gestión pública: Fijando el curso.Calidad del gasto y gestión pública: Fijando el curso.
Calidad del gasto y gestión pública: Fijando el curso.
 
De nuevo, el SNIP: ¿Los “Duros” también lloran?.
De nuevo, el SNIP: ¿Los “Duros” también lloran?.De nuevo, el SNIP: ¿Los “Duros” también lloran?.
De nuevo, el SNIP: ¿Los “Duros” también lloran?.
 
Ramathuthu_pfarelo
Ramathuthu_pfareloRamathuthu_pfarelo
Ramathuthu_pfarelo
 
Food Security - How can remote sensing and GIS help?
Food Security - How can remote sensing and GIS help?Food Security - How can remote sensing and GIS help?
Food Security - How can remote sensing and GIS help?
 
Moodle Themes Samples
Moodle Themes SamplesMoodle Themes Samples
Moodle Themes Samples
 
Ambiente Moodle - Apectos técnicos e Pedagógicos
Ambiente Moodle - Apectos técnicos e Pedagógicos Ambiente Moodle - Apectos técnicos e Pedagógicos
Ambiente Moodle - Apectos técnicos e Pedagógicos
 
BSc. certificate english
BSc. certificate englishBSc. certificate english
BSc. certificate english
 
Informe Técnico 03 Notificações de Receita B e B2
Informe Técnico 03  Notificações de Receita B e B2Informe Técnico 03  Notificações de Receita B e B2
Informe Técnico 03 Notificações de Receita B e B2
 
The Future of the Web - Cold Front conference 2016
The Future of the Web - Cold Front conference 2016The Future of the Web - Cold Front conference 2016
The Future of the Web - Cold Front conference 2016
 

More from Vladimir Smirnov

опис досвіду роботи
опис досвіду роботи опис досвіду роботи
опис досвіду роботи Vladimir Smirnov
 
мета консультації
мета консультаціїмета консультації
мета консультаціїVladimir Smirnov
 
опис досвіду роботи остаточний
опис досвіду роботи остаточнийопис досвіду роботи остаточний
опис досвіду роботи остаточнийVladimir Smirnov
 
презентація на вебинар
презентація на вебинарпрезентація на вебинар
презентація на вебинарVladimir Smirnov
 
опис досвіду роботи Смірнова Володимира Володимировича
опис досвіду роботи Смірнова Володимира Володимировичаопис досвіду роботи Смірнова Володимира Володимировича
опис досвіду роботи Смірнова Володимира ВолодимировичаVladimir Smirnov
 
Презентація з досвіду роботи Смірнова Володимира Володимировича
Презентація з досвіду роботи Смірнова Володимира ВолодимировичаПрезентація з досвіду роботи Смірнова Володимира Володимировича
Презентація з досвіду роботи Смірнова Володимира ВолодимировичаVladimir Smirnov
 
Опис досвіду роботи
Опис досвіду роботи Опис досвіду роботи
Опис досвіду роботи Vladimir Smirnov
 
самоучитель по Scratch
самоучитель по Scratchсамоучитель по Scratch
самоучитель по ScratchVladimir Smirnov
 
ппз для початкової школи
ппз для початкової школи ппз для початкової школи
ппз для початкової школи Vladimir Smirnov
 

More from Vladimir Smirnov (10)

опис досвіду роботи
опис досвіду роботи опис досвіду роботи
опис досвіду роботи
 
мета консультації
мета консультаціїмета консультації
мета консультації
 
опис досвіду роботи остаточний
опис досвіду роботи остаточнийопис досвіду роботи остаточний
опис досвіду роботи остаточний
 
доповідь
доповідьдоповідь
доповідь
 
презентація на вебинар
презентація на вебинарпрезентація на вебинар
презентація на вебинар
 
опис досвіду роботи Смірнова Володимира Володимировича
опис досвіду роботи Смірнова Володимира Володимировичаопис досвіду роботи Смірнова Володимира Володимировича
опис досвіду роботи Смірнова Володимира Володимировича
 
Презентація з досвіду роботи Смірнова Володимира Володимировича
Презентація з досвіду роботи Смірнова Володимира ВолодимировичаПрезентація з досвіду роботи Смірнова Володимира Володимировича
Презентація з досвіду роботи Смірнова Володимира Володимировича
 
Опис досвіду роботи
Опис досвіду роботи Опис досвіду роботи
Опис досвіду роботи
 
самоучитель по Scratch
самоучитель по Scratchсамоучитель по Scratch
самоучитель по Scratch
 
ппз для початкової школи
ппз для початкової школи ппз для початкової школи
ппз для початкової школи
 

Recently uploaded

Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxsocialsciencegdgrohi
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerunnathinaik
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,Virag Sontakke
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 

Recently uploaded (20)

Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developer
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 

Программирование 10-11 класс олимпиада решения городской

  • 1. Решение городской олимпиады программирование 10-11 класс 1. Степень симметрии var n:string; k,i:integer; begin readln(n); if length(n) mod 2=0 then k:=0 else k:=1; for i:=1 to length(n) div 2 do if n[i]=n[length(n)+1-i] then k:=k+1; writeln(k); end. //100% var n1,n,ch,zif,k,raz:int64; i:integer; begin readln(n); ch:=0; n1:=n; raz:=0; while n<>0 do begin zif:=n mod 10; n:=n div 10; ch:=ch*10+zif; raz:=raz+1; end; //writeln('raz=',raz); if (raz mod 2=1) or (n1=0) then k:=1 else k:=0; for i:=1 to raz div 2 do begin if n1 mod 10 =ch mod 10 then k:=k+1; n1:=n1 div 10; ch:=ch div 10; end; writeln(k); end. //100% 2. Счастливые билеты var n,i1,i2,i3,i4,i5,i6,k:integer; begin readln(n); k:=0; for i1:=0 to 9 do for i2:=0 to 9 do for i3:=0 to 9 do for i4:=0 to 9 do for i5:=0 to 9 do for i6:=0 to 9 do
  • 2. if (i1+i2+i3=i4+i5+i6) and (i1+i2+i3=n) then k:=k+1; writeln(k); end. //100% 3. Разница в зарплате var max,min,a,raz:real; i:integer; begin read(a); max:=a; min:=a; while not eoln do begin read(a); if max<a then max:=a; if min>a then min:=a; end; raz:=max-min; writeln(raz:0:2); end. //100% 4. Шарики var a,i,n,s,max,kol:longint; sh:array[1..9] of longint; begin readln(n); for i:=1 to 9 do sh[i]:=0; for i:=1 to n do begin read(a); sh[a]:=sh[a]+1; end; s:=sh[1]; max:=sh[1]; for i:=2 to 9 do begin s:=s+sh[i]; if max<sh[i] then max:=sh[i]; end; kol:=s-max; writeln(kol); end.//100% 5. Распаковка строчки var s,z:ansistring; //string 75% i,k,t,c:integer; begin Readln(z); s:=''; z:=z+'0';
  • 3. while z[1]<>'0' do begin if z[1] in ['1'..'9'] then begin k:=1; if z[2] in ['0'..'9'] then k:=2; Val(Copy(z,1,k),t,c); for i:=1 to t do s:=s+z[k+1]; Delete(z,1,k+1); end else begin s:=s+z[1]; Delete(z,1,1); end; end; while Length(s)>40 do begin writeln(Copy(s,1,40)); Delete(s,1,40); end; Writeln(s); end. //100% тестов