SlideShare uma empresa Scribd logo
1 de 3
Baixar para ler 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% тестов

Mais conteúdo relacionado

Destaque

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
 

Destaque (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
 

Mais de Vladimir Smirnov

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

Mais de Vladimir Smirnov (10)

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

Último

Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnvESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnvRicaMaeCastro1
 
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxGrade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxkarenfajardo43
 
4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptx4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptxmary850239
 
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITWQ-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITWQuiz Club NITW
 
Tree View Decoration Attribute in the Odoo 17
Tree View Decoration Attribute in the Odoo 17Tree View Decoration Attribute in the Odoo 17
Tree View Decoration Attribute in the Odoo 17Celine George
 
CHEST Proprioceptive neuromuscular facilitation.pptx
CHEST Proprioceptive neuromuscular facilitation.pptxCHEST Proprioceptive neuromuscular facilitation.pptx
CHEST Proprioceptive neuromuscular facilitation.pptxAneriPatwari
 
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...DhatriParmar
 
How to Manage Buy 3 Get 1 Free in Odoo 17
How to Manage Buy 3 Get 1 Free in Odoo 17How to Manage Buy 3 Get 1 Free in Odoo 17
How to Manage Buy 3 Get 1 Free in Odoo 17Celine George
 
Expanded definition: technical and operational
Expanded definition: technical and operationalExpanded definition: technical and operational
Expanded definition: technical and operationalssuser3e220a
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxlancelewisportillo
 
Sulphonamides, mechanisms and their uses
Sulphonamides, mechanisms and their usesSulphonamides, mechanisms and their uses
Sulphonamides, mechanisms and their usesVijayaLaxmi84
 
Indexing Structures in Database Management system.pdf
Indexing Structures in Database Management system.pdfIndexing Structures in Database Management system.pdf
Indexing Structures in Database Management system.pdfChristalin Nelson
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfVanessa Camilleri
 
4.9.24 School Desegregation in Boston.pptx
4.9.24 School Desegregation in Boston.pptx4.9.24 School Desegregation in Boston.pptx
4.9.24 School Desegregation in Boston.pptxmary850239
 
Mythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWMythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWQuiz Club NITW
 
Scientific Writing :Research Discourse
Scientific  Writing :Research  DiscourseScientific  Writing :Research  Discourse
Scientific Writing :Research DiscourseAnita GoswamiGiri
 

Último (20)

Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnvESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
 
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxGrade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
 
4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptx4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptx
 
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITWQ-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
 
Tree View Decoration Attribute in the Odoo 17
Tree View Decoration Attribute in the Odoo 17Tree View Decoration Attribute in the Odoo 17
Tree View Decoration Attribute in the Odoo 17
 
CHEST Proprioceptive neuromuscular facilitation.pptx
CHEST Proprioceptive neuromuscular facilitation.pptxCHEST Proprioceptive neuromuscular facilitation.pptx
CHEST Proprioceptive neuromuscular facilitation.pptx
 
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
 
How to Manage Buy 3 Get 1 Free in Odoo 17
How to Manage Buy 3 Get 1 Free in Odoo 17How to Manage Buy 3 Get 1 Free in Odoo 17
How to Manage Buy 3 Get 1 Free in Odoo 17
 
Expanded definition: technical and operational
Expanded definition: technical and operationalExpanded definition: technical and operational
Expanded definition: technical and operational
 
Paradigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTAParadigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTA
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
 
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptxINCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
 
Sulphonamides, mechanisms and their uses
Sulphonamides, mechanisms and their usesSulphonamides, mechanisms and their uses
Sulphonamides, mechanisms and their uses
 
Faculty Profile prashantha K EEE dept Sri Sairam college of Engineering
Faculty Profile prashantha K EEE dept Sri Sairam college of EngineeringFaculty Profile prashantha K EEE dept Sri Sairam college of Engineering
Faculty Profile prashantha K EEE dept Sri Sairam college of Engineering
 
Indexing Structures in Database Management system.pdf
Indexing Structures in Database Management system.pdfIndexing Structures in Database Management system.pdf
Indexing Structures in Database Management system.pdf
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdf
 
4.9.24 School Desegregation in Boston.pptx
4.9.24 School Desegregation in Boston.pptx4.9.24 School Desegregation in Boston.pptx
4.9.24 School Desegregation in Boston.pptx
 
Mythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWMythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITW
 
Scientific Writing :Research Discourse
Scientific  Writing :Research  DiscourseScientific  Writing :Research  Discourse
Scientific Writing :Research Discourse
 

Программирование 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% тестов