The state final certification for ninth grade graduates is currently voluntary; you can always refuse and take the usual traditional exams.

Why then is the OGE (GIA) form more attractive for 9th grade graduates of 2019? Conducting direct certification in this new form allows you to obtain an independent assessment of schoolchildren’s preparation. All OGE (GIA) tasks are presented in the form special form, which includes multiple choice questions. A direct analogy is drawn with the Unified State Exam. In this case, you can give both short and detailed answers. Our website website will help you prepare well and realistically assess your chances. Besides, GIA and OGE tests online with answer checking help you decide on your further choice of a specialized high school class. You yourself can easily assess your knowledge in the chosen subject. To do this, our project offers you various tests in a number of disciplines. Our website dedicated to preparation for passing the State Examination Test 2019, grade 9 online, will fully help you prepare for the first serious and responsible test in life.

All materials on our site are presented in a simple, easy-to-understand form. Whether you are an excellent student in your class or an ordinary average student, everything is now in your hands. It would be a good idea for you to visit ours. Here you will find answers to all your questions. Be prepared for the difficult test of the OGE, GIA and the result will exceed all your expectations.

1. A textbook on computer science, typed on a computer, contains 256 pages, each page has 40 lines, each line has 60 characters. To encode characters, the KOI-8 encoding is used, in which each character is encoded with 8 bits. Determine the information volume of the textbook.

2) 200 KB

3) 600 KB

4) 1200 bytes

Explanation.

Let's find the number of characters in the article:

256 40 60 = 2 8 5 15 2 5 = 75 2 13.

One character is encoded by one byte, 2 10 bytes make up 1 kilobyte, so the information volume of the article is

75 · 8 · 2 10 bytes = 600 KB.

2. The text of the story was typed on a computer. The information volume of the resulting file is 9 KB. The text takes up 6 pages, each page has the same number of lines, each line has 48 characters. All characters are presented in KOI-8 encoding, in which each character is encoded with 8 bits. Determine how many lines fit on each page.

Explanation.

Information volume of the file V = 8P.S.C., Where P- number of pages, S-number of lines, C- the number of characters in a line, the multiplier 8 is the information weight of one character in bits. Where do we get it from:

S = V/(8PC)=9 2 10 2 3 /(8 6 48) = 32

There are 32 lines on one page.

The correct answer is listed at number 3.

3. In one of the Unicode encodings, each character is encoded with 16 bits. Determine the size of the following sentence in this encoding. Seven times measure cut once!

Explanation.

The sentence has 33 characters. Therefore, the Unicode sentence size is: 33 16 = 528 bits.

The correct answer is listed at number 4.

4. For which of the given names is the statement false:

NOT((First letter is consonant) AND(The last letter is a vowel))?

Explanation.

Let's transform AND into OR according to De Morgan's rules:

NOT(First letter is consonant) OR NOT(Last letter is vowel)

Let's write an equivalent statement:

(First letter is vowel) OR(The last letter is a consonant)

Logical "OR" is false only if both statements are false. Let's check all answer options.

1) False, because both statements are false: d - consonant and i - vowel.

2) True, since the second statement is true: l - consonant.

3) True, since both statements are true: a - vowel and m - consonant.

4) True, since the first statement is true: a is a vowel.

5. For which of the following names of Russian writers and poets is the statement true:

NOT (the number of vowels is even) AND NOT (the first letter is a consonant)?

1) Yesenin

2) Odoevsky

3) Tolstoy

Explanation.

Logical "AND" is true only when both statements are true. Let's check all answer options.

1) Yesenin - true, since both statements are true.

2) Odoevsky - false, since the statement “NOT (the number of vowels is even)” is false.

3) Tolstoy is false, since the statement “NOT (the first letter is a consonant)” is false.

4) Fet is false, since both statements are false.

The correct answer is listed under number 1.

6. For which of the given values ​​of the number X true statement: ( X < 5) AND NOT (X < 4)?

Explanation.

Logical "AND" is true only when both statements are true. Let's write the expression in the form

(X < 5)AND (X >= 4)

And let's check all the answer options.

1) False, because the first statement is false: 5 is less than 5.

2) False, because the second statement is false: 2 is not less than 4.

3) False, because the second statement is false: 3 is not less than 4.

4) True, since both statements are true: 4 is less than 5 and 4 is not less than 4.

The correct answer is listed at number 4.

7. Roads were built between settlements A, B, C, D, E, the length of which (in kilometers) is given in the table:

Explanation.

From point A you can get to points B, D.

From point B you can get to points C, D.

A-D-B-C-E: route length 12 km.

A-D-C-E: route length 9 km.

A-B-D-C-E: route length 8 km.

8. Roads were built between settlements A, B, C, D, E, the length of which (in kilometers) is given in the table:

Determine the length of the shortest path between points A and E. You can only travel along roads whose length is indicated in the table.

Explanation.

Let's find all route options from A to E and choose the shortest one.

From point A you can get to point B.

From point B you can get to points C, D, E.

From point C you can get to point E.

From point D you can get to point E.

A-B-C-E: route length 9 km.

A-B-E: route length 9 km.

A-B-D-E: route length 7 km.

The correct answer is listed at number 3.

9. Roads were built between settlements A, B, C, D, E, the length of which (in kilometers) is given in the table:

Determine the length of the shortest path between points A and E. You can only travel along roads whose length is indicated in the table.

Explanation.

Let's find all route options from A to E and choose the shortest one.

From point A you can get to points B, C, D.

From point B you can get to point C.

From point C you can get to points D, E.

A-B-C-E: route length 7 km.

A-C-E: route length 7 km.

A-D-C-E: route length 6 km.

The correct answer is listed at number 3.

10. A file was stored in a certain directory Lilac.doc who had a full name D:\2013\Summer\Lilac.doc June and file Lilac.doc moved to the created subdirectory. Provide the full name of this file after moving it.

1) D:\2013\Summer\Lilac.doc

2) D:\2013\Summer\June\Lilac.doc

Explanation.

The full file name after moving will be D:\2013\Summer\June\Lilac.doc.

11. A file was stored in a certain directory Lilac.doc. A subdirectory has been created in this directory June and file Lilac.doc moved to the created subdirectory. The full file name became

D:\2013\Summer\June\Lilac.doc

Please provide the full name of this file before moving it.

1) D:\2013\Summer\Lilac.doc

2) D:\2013\Lilac.doc

3) D:\2013\Summer\June\Lilac.doc

Explanation.

The full file name before moving was D:\2013\Summer\Lilac.doc.

The correct answer is listed under number 1.

12. Marina Ivanova, working on a literature project, created the following files:

D:\Literature\Project\Yesenin.bmp

D:\Study\Work\Writers.doc

D:\Study\Work\Poets.doc

D:\Literature\Project\Pushkin. bmp

D:\Literature\Project\Poems.doc

Specify the full name of the folder, which will remain empty when all files with the extension are deleted .doc. Assume that there are no other files and folders on drive D.

1) Literature

2) D:\Study\Work

3) D:\Study

4) D:\Literature\Project

Explanation.

Note that there are no other files in the "Work" folder except Writers.doc And Poets.doc. Therefore, when deleting all files with the extension .doc, this folder will remain empty.

The correct answer is listed at number 2.

Given is a fragment of the spreadsheet:

The diagram shows that the values ​​in three cells are equal, and in the fourth they are three times larger. Since A2 = B2 ≠ D2, C2 = 3.

The found value of C2 corresponds to the formula indicated under number 2.

14. Given a fragment of a spreadsheet:

The diagram shows that the values ​​in three cells are equal, and the value in the fourth is three times greater than the sum of the values ​​in the first three cells B2 = C2 = 1 therefore, D2 = 1.

The found value of D2 corresponds to the formula indicated under number 2.

15. Given a fragment of a spreadsheet:

The diagram shows that the values ​​in the three cells are equal. Since C2 = D2, therefore A2 = 3.

The found value of A2 corresponds to the formula indicated under number 4.

16. Performer The draftsman moves on the coordinate plane, leaving a trace in the form of a line. The draftsman can execute the command Move to ( a, b) (Where a, b (x, y) to the point with coordinates (x + a, y + b). If the numbers a, b positive, the value of the corresponding coordinate increases; if negative, decreases.

(4, 2)(2, −3) (6, −1).

Repeat k times

Team1 Team2 Team3

End

Team1 Team2 Team3 will happen again k once.

Repeat 5 times

Shift to (0, 1) Shift to (−2, 3) Shift to (4, −5) End

The coordinates of the point from which the Draftsman began his movement are (3, 1). What are the coordinates of the point where he ended up?

Explanation.

Team Repeat 5 times means that the teams Shift by (0, 1) Shift by (−2, 3) Shift by (4, −5) will be executed five times. As a result, the Draftsman will move 5·(0 − 2 + 4, 1 + 3 − 5) = (10, −5). Since the Draftsman started moving at a point with coordinates (3, 1), the coordinates of the point at which he ended up are: (13, −4) .

The correct answer is listed at number 3.

17. Performer The draftsman moves on the coordinate plane, leaving a trace in the form of a line. The draftsman can execute the command Move to ( a, b) (Where a, b- integers), moving the Draftsman from the point with coordinates (x, y) to the point with coordinates (x + a, y + b). If the numbers a, b positive, the value of the corresponding coordinate increases; if negative, it decreases.

For example, if the Draftsman is at a point with coordinates (4, 2), then the command Move to(2, −3)will move the Draftsman to the point(6, −1).

Repeat k times

Team1 Team2 Team3

End

Means that the sequence of commands Team1 Team2 Team3 will happen again k once.

The draftsman was given the following algorithm to execute:

Repeat 3 times

End

What one command can this algorithm be replaced with so that the Draftsman ends up at the same point as after executing the algorithm?

1) Shift by (−9, −3)

2) Shift to (−3, 9)

3) Shift by (−3, −1)

4) Move to (9, 3)

Explanation.

Team Repeat 3 times means that the teams Shift by (−2, −3) Shift by (3, 2) Shift by (−4,0) will be executed three times. As a result, the Draftsman will move to 3·(−2 + 3 − 4, −3 + 2 + 0) = (−9, −3). Thus, this algorithm can be replaced with the command Move to (−9, −3).

The correct answer is listed under number 1.

18. Performer The draftsman moves on the coordinate plane, leaving a trace in the form of a line. The draftsman can execute the command Shift to (a, b) (Where a, b– integers) moving the Draftsman from the point with coordinates ( x, y) to a point with coordinates ( x + a, y + b). If the numbers a, b If positive, the value of the corresponding coordinate increases, if negative, it decreases.

For example, if the Draftsman is at a point with coordinates (1, 1), then the Move to (–2, 4) command will move the Draftsman to the point (–1, 5).

Repeat k times

Team1 Team2 Team3

end

means that the sequence of commands Team1 Team2 Team3 will be repeated k times.

The draftsman was given the following algorithm to execute:

Repeat 3 times

Shift by (–2, –3) Shift by (3, 4)

end

Shift by (–4, –2)

What command must the Draftsman execute in order to return to the starting point from which he started moving?

1) Shift by (1, –1)

2) Shift by (–3, –1)

3) Shift by (–3, –3)

4) Shift by (–1, 1)

Explanation.

Team Repeat 3 times means that the teams Shift by (–2, –3) and Shift by (3, 4) will be executed three times. As a result, the Draftsman will move to 3·(−2 + 3, −3 + 4) = (3, 3). Thus, the draftsman will be at point (3; 3), then he will execute the command Shift by (–4, –2), after which it will end up at point (−1; 1). Therefore, in order for the Draftsman to return to the starting point, he needs to execute the command Shift by (1, −1).

Answer: 1.

19. The following encrypted radiogram was received from the intelligence officer, transmitted using Morse code:

– – – – – – – –

When transmitting the radiogram, the letter breakdown was lost, but it is known that only the following letters were used in the radiogram:

Some encryptions can be decrypted in more than one way. For example, 00101001 can mean not only URA, but also UAU. Three code chains are given:

Explanation.

1) “0100100101” can mean both “AUUA” and “RRAA” and “RAUA”.

2) "011011111100" can only mean "ENTER".

3) “0100110001” can mean either “AUDA” or “RADA”.

Answer: "ENTER".

Answer: ENTER

21. Valya encrypts Russian words (sequences of letters), writing down its code instead of each letter:

A D TO N ABOUT WITH
01 100 101 10 111 000

Some chains can be decrypted in more than one way. For example, 00010101 can mean not only SKA, but also SNK. Three code chains are given:

Find among them the one that has only one decryption, and write down the decrypted word in your answer.

Explanation.

Let's analyze each answer option:

1) “10111101” can mean either “KOA” or “NOK”.

2) “100111101” can mean either “DOC” or “NAOA”.

3) "0000110" can only mean "SAN".

Hence the answer is "SAN".

Answer: SAN

22. In the program, “:=” denotes the assignment operator, the signs “+”, “–”, “*” and “/” - respectively, the operations of addition, subtraction, multiplication and division. The rules for performing operations and the order of actions correspond to the rules of arithmetic.

Determine the value of a variable b after executing the algorithm:

A:= 8
b:= 3
a:= 3 * a – b
b:= (a / 3) * (b + 2)

In your answer, indicate one integer - the value of the variable b.

Explanation.

Let's run the program:

A:= 8
b:= 3
a:= 3 * 8 – 3 = 21
b:= (21 / 3) * (3 + 2) = 35

23. In the program, “:=” denotes the assignment operator, the signs “+”, “-”, “*” and “/” - respectively, the operations of addition, subtraction, multiplication and division. The rules for performing operations and the order of actions correspond to the rules of arithmetic. Determine the value of the variable b after executing the algorithm:

a:= 7
b:= 2
a:= b*4 + a*3
b:= 30 - a

Explanation.

Let's run the program:

A:= 7
b:= 2
a:= b*4 + a*3 = 8 + 21 = 29
b:= 30 - a = 1.

24. The algorithm below uses the variables a and b. The symbol “:=” denotes the assignment operator, the signs “+”, “-”, “*” and “/” - respectively, the operations of addition, subtraction, multiplication and division. The rules for performing operations and the order of actions correspond to the rules of arithmetic. Determine the value of the variable b after executing the algorithm:

a:= 5
b:= 2 + a
a:= a*b
b:= 2*a - b

In your answer, indicate one integer - the value of the variable b.

Explanation.

Let's run the program:

A:= 5
b:= 2 + a = 7
a:= a*b = 35
b:= 2*a - b = 63.

25. Determine what will be printed as a result of the following program. The program text is provided in three programming languages.

Explanation.

The “for k:= 0 to 9 do” loop is executed ten times. Each time the variable s increases by 3. Since initially s = 3, after executing the program we get: s = 3 + 10 3 = 33.

26. Determine what will be printed as a result of the following program. The program text is provided in three programming languages.

Explanation.

The “for k:= 1 to 9 do” loop is executed nine times. Each time the variable s decreases by 3. Since initially s = 50, after executing the program we get: s = 50 − 9 3 = 23.

27. Determine what will be printed as a result of the following program. The program text is provided in three programming languages.

Explanation.

The “for k:= 1 to 7 do” loop is executed seven times. Each time the variable s is multiplied by 2. Since initially s = 1, after executing the program we get: s = 1 2 2 2 2 2 2 2 2 = 128.

28. The Dat table presents data on the number of votes cast for 10 performers of folk songs (Dat - the number of votes cast for the first performer; Dat - for the second, etc.). Determine what number will be printed as a result of the following program. The program text is provided in three programming languages.

Algorithmic language BASIC Pascal

alg
beginning
celtab Dat
integer k, m
Date := 16
Dat := 20
Dat := 20
Date := 41
Date := 14
Date := 21
Dat := 28
Date := 12
Dat := 15
Dat := 35
m:= 0
nc for k from 1 to 10
if Dat[k]>m then
m:=Dat[k]
All
kts
output m
con

DIM Dat(10) AS INTEGER
DIM k,m AS INTEGER
Dat(1) = 16: Dat(2) = 20
Dat(3) = 20: Dat(4) = 41
Dat(5) = 14: Dat(6) = 21
Dat(7) = 28: Dat(8) = 12
Dat(9) = 15:Dat(10) = 35
m = 0
FOR k = 1 TO 10
IF Dat(k)>m THEN
m = Dat(k)
ENDIF
NEXT k
PRINT m

Var k, m: integer;

Begin
Dat := 16; Dat := 20;
Dat := 20; Dat := 41;
Dat := 14; Dat := 21;
Dat := 28; Dat := 12;
Dat := 15; Dat := 35;
m:= 0;
for k:= 1 to 10 do
if Dat[k]>m then
begin
m:=Dat[k]
end;
writeln(m);
End.

Explanation.

The program is designed to find the maximum number of votes cast for one artist. After analyzing the input data, we come to the conclusion that the answer is 41.

Answer: 41.

29. The Dat table stores data on the number of tasks completed by students (Dat tasks were completed by the first student, Dat - by the second, etc.). Determine what number will be printed as a result of the following program. The program text is provided in three programming languages.

Algorithmic language BASIC Pascal

algnach
celtab Dat
integer k, m, n

m:= 10; n:=0
nc for k from 1 to 10
if Dat[k]< m то
m: = Dat[k]
n:=k
All

DIM Dat(10) AS INTEGER

DIM k,m,n AS INTEGER

IF Date(k)< m THEN

m =Dat[k]
n = k

Var k, m, n: integer;

Dat: array of integer;

m:= 10; n: = 0;
for k:= 1 to 10 do
if Dat[k]< m then
begin
m:=Dat[k];
n:=k
end;
writeln(n);

Explanation.

The program is designed to find the number of the student who completed the least number of tasks. After analyzing the input data, we come to the conclusion that the answer is 4.

30. The Dat table stores the grades of 9th grade students for independent work (Dat is the grade of the first student, Dat is the grade of the second, etc.). Determine what number will be printed as a result of the following program. The program text is provided in three programming languages.

Algorithmic language BASIC Pascal

alg
beginning
celtab Dat
integer k, m
Dat := 4
Dat := 5
Dat := 4
Dat := 3
Dat := 2
Dat := 3
Dat := 4
Dat := 5
Dat := 5
Dat := 3
m:= 0
nc for k from 1 to 10
if Dat[k]< 4 то
m:= m + Dat[k]
All
kts
output m
con

DIM Dat(10) AS INTEGER
DIM k, m AS INTEGER
Dat(1) = 4: Dat(2) = 5
Dat(3) = 4: Dat(4) = 3
Dat(5) = 2: Dat(6) = 3
Dat(7) = 4: Dat(8) = 5
Dat(9) = 5: Dat(10) = 3
m = 0
FOR k = 1 TO 10
IF Date(k)< 4 THEN
m = m + Dat(k)
END IF
NEXT k
PRINT m
END

Var k, m: integer;
Dat: array of integer;
Begin
Dat := 4; Dat := 5;
Dat := 4; Dat := 3;
Dat := 2; Dat := 3;
Dat := 4; Dat := 5;
Dat := 5; Dat := 3;
m:= 0;
for k:= 1 to 10 do
if Dat[k]< 4 then
begin
m:= m + Dat[k];
end;
writeln(m);
End.

Explanation.

The program is designed to find the sum of grades of students whose grade is less than a four. After analyzing the input data, we come to the conclusion that the answer is the number 11.

Answer: 11.

31. The figure shows a diagram of roads connecting cities A, B, C, D, E, F, G, H. On each road you can only move in one direction, indicated by the arrow. How many different routes are there from city A to city H?

Explanation.

You can come to H from C, D or G, so N = N H = N C + N D + N G (*).

Likewise:

N C = N A + N D = 1 + 3 = 4;

N G = N D + N E + N F = 3 + 2 + 1 = 6;

N D = N A + N E = 1 + 2 = 3;

N E = N A + N B = 1 + 1 = 2;

Let's substitute into formula (*): N = 4 + 3 + 6 = 13.

Answer: 13.

32. The figure shows a diagram of roads connecting cities A, B, C, D, D, E, K. On each road you can only move in one direction, indicated by the arrow. How many different routes are there from city A to city K?

Explanation.

Let's start counting the number of paths from the end of the route - from city K. Let N X be the number of different paths from city A to city X, N be the total number of paths.

You can come to K from E or D, so N = N K = N E + N D (*).

Likewise:

N D = N B + N A = 1 + 1 = 2;

N E = N B + N B + N G = 1 + 2 + 3 = 6;

N B = N A = 1;

N B = N B + N A = 1 + 1 = 2;

N G = N A + N B = 1 + 2 = 3.

Let's substitute into formula (*): N = 2 + 6 = 8.

33. The figure shows a diagram of roads connecting cities A, B, C, D, E, F, G, H. On each road you can only move in one direction, indicated by the arrow. How many different routes are there from city A to city H?

Explanation.

Let's start counting the number of paths from the end of the route - from city H. Let N X be the number of different paths from city A to city X, N be the total number of paths.

You can come to H from E, F or G, so N = N H = N E + N F + N G (*).

Likewise:

N E = N A + N F = 1 + 4 = 5;

N G = N F + N D + N C = 4 + 3 + 1 = 8;

N F = N A + N D = 1 + 3 = 4;

N D = N A + N B + N C = 1+ 1 + 1 = 3;

Let's substitute into formula (*): N = 5 + 4 + 8 = 17.

Answer: 17.

34. Below in tabular form is a fragment of the “Books from our store” database.

How many genres in this fragment satisfy the condition

(Number of books > 35) AND (Average cost< 300)?

In your answer, indicate one number - the required number of genres.

Explanation.

Logical "AND" is true when both statements are true. Therefore, those options are suitable in which the number of books exceeds 35 and the average cost is less than 300 rubles. There are 2 such options.

Answer: 2.

35. Below in tabular form is presented a fragment of the database “Departure of long-distance trains”:

Destination Train category Travel time Railway station
Baku fast 61:24 Kursk
Balashov passenger 17:51 Paveletsky
Balashov passenger 16:57 Paveletsky
Balkhash fast 78:45 Kazansky
Berlin fast 33:06 Belorussian
Brest fast 14:47 Belorussian
Brest fast 24:16 Belorussian
Brest accelerated 17:53 Belarusian
Brest passenger 15:45 Belorussian
Brest passenger 15:45 Belorussian
Valuyki branded 14:57 Kursk
Varna fast 47:54 Kyiv

In your answer, indicate one number - the required number of records.

Explanation.

Logical "OR" is true when at least one statement is true. Therefore, the options in which the train is “passenger” and in which the station is “Belorussky” are suitable. There are 8 such options.

36. Below, in tabular form, is a fragment of the database on Moscow metro tariffs.

How many records in this fragment satisfy the condition (Cost in rubles > 400) OR (Validity period< 30 дней)? In your answer, indicate one number - the required number of records.

Explanation.

Logical "OR" is true when at least one statement is true. Therefore, options are suitable in which the fare is more than 400 rubles or the validity period is less than 30 days. There are 5 such options.

Answer: 5.

37. Convert the number 101010 from the binary number system to the decimal number system. Write down the resulting number in your answer.

Explanation.

Let's imagine the number 101010 as a sum of powers of two:

101010 2 = 1 2 5 + 1 2 3 + 1 2 1 = 32 + 8 + 2 = 42.

38. Convert the number 68 from the decimal number system to the binary number system. How many units does the resulting number contain? In your answer, indicate one number - the number of units.

Explanation.

Let's imagine the number 68 as a sum of powers of two: 68 = 64 + 4. Now let's convert each of the terms to the binary number system and add the results: 64 = 100 0000, 4 = 100. Therefore, 68 10 = 100 0100 2.

Answer: 2.

39. Convert the binary number 1110001 to the decimal number system.

Explanation.

1110001 2 = 1 2 6 + 1 2 5 + 1 2 4 + 1 2 0 = 64 + 32 + 16 + 1 = 113.

40. The performer Kvadrator has two teams, which are assigned numbers:

1. add 3

2. square

The first of them increases the number on the screen by 3, the second raises it to the second power. The performer works only with natural numbers. Create an algorithm for obtaining 58 from number 4, containing no more than 5 commands. In your answer, write down only the command numbers.

(For example, 22111 is an algorithm:
square it
square it
add 3
add 3
add 3,
which converts the number 3 to 90).

Explanation.

The closest number to 58 whose square root is a whole number is 49 = 7 2 . Note that 58 = 49 + 3 + 3 + 3. Let’s move sequentially from the number 4 to the number 58:

4 + 3 = 7 (team 1);

7 2 = 49 (team 2);

49 + 3 = 52 (team 1);

52 + 3 = 55 (team 1);

55 + 3 = 58 (team 1).

Answer: 12111.

Answer: 12111

41. The Multiplier performer has two teams, which are assigned numbers:

1. multiply by 3

2. subtract 1

The first of them multiplies the number by 3, the second subtracts 1 from the number. The performer works only with natural numbers. Create an algorithm for obtaining the number 61 from the number 8, containing no more than 5 commands. In your answer, write down only the command numbers.

(For example, 22112 is an algorithm:
subtract 1
subtract 1
multiply by 3
multiply by 3
subtract 1
which converts the number 5 to 26.

If there is more than one such algorithm, then write down any of them.

Explanation.

Let's go sequentially from the number 8 to the number 61:

8 − 1 = 7 (team 2);

7 3 = 21 (team 1);

21 · 3 = 63 (team 1);

63 − 1 = 62 (team 2);

62 − 1 = 61 (team 2).

Answer: 21122.

Answer: 21122

42. The Multiplier performer has two teams, which are assigned numbers:

1. multiply by 3

2. add 2

The first of them multiplies the number by 3, the second adds it to the number 2. Create an algorithm for obtaining the number 58 from number 2, containing no more than 5 commands. In your answer, write down only the command numbers.

(For example, 21122 is an algorithm:
add 2
multiply by 3
multiply by 3
add 2
add 2,
which converts the number 1 to 31).

If there is more than one such algorithm, then write down any of them.

Explanation.

Multiplication by a number is not invertible for any number, therefore, if we go from the number 58 to the number 2, we will definitely restore the program. Received commands will be written from right to left. If the number is not a multiple of 3, then subtract 2, and if it is a multiple, then divide by 3:

58 − 2 = 56 (team 2);

56 − 2 = 54 (team 2);

54 / 3 = 18 (team 1);

18 / 3 = 6 (team 1).

6 / 3 = 2 (team 1).

Let's write the sequence of commands in reverse order and get the answer: 11122.

Answer: 11122.

Answer: 11122

43. A 32 KB file is transferred over a connection at a speed of 1024 bits per second. Determine the file size (in bytes) that can be transferred in the same time over another connection at 128 bits per second. In your answer, indicate one number - the file size in bytes. There is no need to write units of measurement.

Explanation.

Transferred file size = transfer time · transfer speed. Note that the transmission speed in the second case is 1024/128 = 8 times less than the speed in the first case. Since the file transfer time is the same, the file size that can be transferred in the second case is also 8 times smaller. It will be equal to 32/8 = 4 KB = 4096 bytes.

Answer: 4096

44. A 2 MB file is transferred over a certain connection in 80 seconds. Determine the size of the file (in KB) that can be transferred over the same connection in 120 seconds. In your answer, indicate one number - the file size in KB. There is no need to write units of measurement.

Explanation.

Transferred file size = transfer time · transfer speed. Note that the transmission time in the second case is 120/80 = 1.5 times longer than the time in the first case. Since the file transfer speed is the same, the file size that can be transferred in the second case is also 1.5 times larger. It will be equal to 1.5 · 2048 = 3072 KB.

Answer: 3072

45. A 2000 KB file is transferred over a certain connection within 30 seconds. Determine the file size (in KB) that can be transferred over this connection in 12 seconds. In your answer, indicate one number - the file size in KB. There is no need to write units of measurement.

Explanation.

Let's calculate the data transfer rate over the channel: 2000 KB/30 sec = 200/3 KB/sec. Therefore, the file size that can be transferred in 12 seconds is 200/3 KB/sec · 12 sec = 800 KB.

46. ​​The machine receives a four-digit decimal number as input. Based on the resulting number, a new decimal number is constructed according to the following rules.

1. Two numbers are calculated - the sum of the first and second digits and the sum of the third and fourth digits of a given number.

2. The resulting two numbers are written one after another in non-decreasing order (without separators).

Example. Initial number: 2177. Bitwise sums: 3, 14. Result: 314.

Determine how many of the numbers below can be obtained as a result of the machine's operation.

1915 20 101 1213 1312 312 1519 112 1212

In your answer, write down only the number of numbers.

Explanation.

Let's analyze each number.

The number 1915 cannot be the result of the machine, since the number 19 cannot be obtained by adding two digits.

The number 20 cannot be the result of the machine, since the resulting two numbers are written one after another in non-decreasing order.

The number 101 cannot be the result of the machine, since its first part is 1, and the second, 01, is not a number.

The number 1213 could be the result of the machine, in which case the original number could have been 6667.

The number 1312 cannot be the result of the machine, since the resulting two numbers are written one after another in non-decreasing order.

The number 312 could be the result of a machine, in which case the original number could have been 2166.

The number 1519 cannot be the result of the machine, since numbers are written in non-descending order, and the number 19 cannot be obtained by adding two digits.

The number 112 could be the result of a machine, in which case the original number could have been 1057.

The number 1212 could be the result of the machine, in which case the original number could have been 6666.

47. A chain of four beads marked with Latin letters is formed according to the following rule:

– in the third place of the chain there is one of the beads H, E;
– in second place - one of the beads D, E, C, which is not in third place;
– at the beginning there is one of the beads D, H, B, which is not in second place;
– at the end - one of the beads D, E, C, not in first place.

Determine how many of the listed chains were created according to this rule?

DEHD HEHC DCEE DDHE DCHE HDHD BHED EDHC DEHE

In your answer, write down only the number of chains.

Explanation.

First chain DEHD does not satisfy the fourth condition of the rule, the fourth DDHE- to the third. Seventh chain BHED does not satisfy the second condition of the rule. Eighth chain EDHC does not satisfy the third condition of the rule.

Thus, we have five chains that satisfy the condition.

48. Some algorithm obtains a new chain from one chain of symbols as follows. First, the length of the original string of characters is calculated; if it is even, then the last character of the chain is deleted, and if it is odd, then the symbol C is added to the beginning of the chain. In the resulting chain of symbols, each letter is replaced by the letter that follows it in the Russian alphabet (A - to B, B - to C, etc.) d., and I - on A). The resulting chain is the result of the algorithm.

For example, if the original chain was LEG OPD, and if the initial chain was TONE, then the result of the algorithm will be the chain STUPID.

Given a string of characters RAFT. What chain of symbols will be obtained if the described algorithm is applied to this chain twice (i.e., apply the algorithm to this chain, and then apply the algorithm to the result again)? Russian alphabet: ABVGDEYEZHZIYKLMNOPRSTUFHTSCHSHSHSHCHYYYUEYA.

Explanation.

Let's apply the algorithm: RAFT(even) → PLORMP.

Let's use it again: RMP(odd) → SRMPTSNR.

Answer: TSNR

49. File access com.txt mail.nethttp

Explanation.

http://mail.net/com.txt. Therefore, the answer is BWEDAZHG.

Answer: BWEDAZHG

50. File access doc.htm located on the server site.com, carried out according to the protocol http. Fragments of the file address are encoded with letters from A to J. Write down the sequence of these letters encoding the address of the specified file on the Internet.

Explanation.

Let us remind you how an Internet address is formed. First, the protocol is indicated (usually “ftp” or “http”), then “://”, then the server, then “/”, the file name is indicated at the end. So the address would be: http://site.com/doc.htm. Therefore, the answer is ZhBAEGVD.

Answer: ZHBAEGVD

51. File access rus.doc located on the server obr.org, carried out according to the protocol https. Fragments of the file address are encoded with letters from A to J. Write down the sequence of these letters encoding the address specified file on the Internet.

Explanation.

Let us remind you how an Internet address is formed. First, the protocol is indicated (usually “ftp” or “http”), then “://”, then the server, then “/”, the file name is indicated at the end. So the address would be: https://obr.org/rus.doc. Therefore, the answer is ZHGAVBED.

Answer: ZHGAVBED

52. The table shows queries to the search server. Arrange the query designations in ascending order of the number of pages that the search engine will find for each query. The symbol “|” is used to denote the logical “OR” operation in the query, and the “&” symbol is used to indicate the logical “AND” operation:

Explanation.

The more “OR” in the query, the more results the search server produces. The more “AND” operations in a query, the fewer results it will return. search server. Thus, the answer is BVAG.

Answer: BVAG

53. The table shows queries to the search server. For each request, its code is indicated - the corresponding letter from A to G. Arrange the request codes from left to right in increasing order of the number of pages that the search server found for each request. For all queries, a different number of pages were found. The symbol “|” is used to denote the logical “OR” operation in the query, and the “&” symbol is used to indicate the logical “AND” operation:

Explanation.

The more “OR” in the query, the more results the search server produces. The more “AND” operations in a query, the fewer results the search server will return. Thus the answer is GBVA.

Answer: GBVA

54. The table shows queries to the search server. Arrange the query designations in ascending order of the number of pages that the search engine will find for each query. The symbol “|” is used to denote the logical “OR” operation in the query, and the “&” symbol is used to indicate the logical “AND” operation:

Explanation.

The more “OR” in the query, the more results the search server produces. The more “AND” operations in a query, the fewer results the search server will return. Thus, the answer is AGGB.

Answer: AGBV

55. The results of passing standards in athletics among students in grades 7-11 were entered into a spreadsheet. The figure shows the first rows of the resulting table:

Column A shows the last name; in column B - name; in column C - gender; in column D - year of birth; in column E - results in the 1000 meter race; in column F - results in the 30-meter race; Column G shows standing long jump results. In total, data for 1000 students was entered into the spreadsheet.

Complete the task.

1. What percentage of participants showed results in long jumps of more than 2 meters? Write the answer in cell L1 of the table.

2. Find the difference in seconds, to the nearest tenth, between the average result of participants born in 1996 and the average result of participants born in 1999 in the 30-meter dash. Write the answer to this question in cell L2 of the table.

Complete the task.

Open the file containing this spreadsheet. Based on the data contained in this table, answer two questions.

1. How many days during this period was the atmospheric pressure above 760 mmHg? Write the answer to this question in cell H2 of the table.

2. What was the average wind speed on days with air temperatures below 0 °C? Write the answer to this question with an accuracy of at least 2 decimal places in cell H3 of the table.

Explanation.

Solution for OpenOffice.org Calc and Microsoft Excel

The first formula is used for writing functions in Russian, the second - for English.

In cell H2 we write a formula that determines how many days during a given period the atmospheric pressure was above 760 mmHg:

COUNTIF(C2:C397;»>760″)
=COUNTIF(C2:C397;">760″)

To answer the second question in cell, in column G for each day, write down the wind speed if on that day the air temperature is below 0 °C, and “” in the opposite case. In cell G2 we write the formula

IF(B2<0;D2; «»)
=IF(B2<0;D2; «»)

Let's copy the formula to all cells of the range G2:G397. Next, to determine the average wind speed, write the formula in cell H3:

AVERAGE(G2:G397)
=AVERAGE(G2:G397)

Other ways to solve the problem are also possible.

If the task was completed correctly and when performing the task, files specially prepared to check the completion of this task were used, then the following answers should be obtained:

for the first question: 6;
to the second question: 1.67.

57. Data on student testing was entered into a spreadsheet. Below are the first five rows of the table:

Column A records the student's district; in column B - last name; in column C - favorite subject; Column D is the test score. In total, data for 1000 students was entered into the spreadsheet.

Complete the task.

Open the file with this spreadsheet (the exam organizers will tell you the location of the file). Based on the data contained in this table, answer two questions.

1. How many students in North-Eastern District (NE) chose mathematics as their favorite subject? Write the answer to this question in cell H2 of the table.

2. What is the average test score for students in the Southern District (S)? Write the answer to this question in cell H3 of the table with an accuracy of at least two decimal places.

Explanation. task19.xls

1. Write the following formula in cell H2 =IF(A2="CB";C2;0) and copy it to the range H3:H1001. In this case, the name of the subject will be written in the cell of column H if the student is from the North-Eastern district and “0” if this is not the case. By applying the operation =IF(H2=”mathematics”;1;0), we get column (J) with ones and zeros. Next, we use the operation =SUM(J2:J1001). Let's get the number of students who consider mathematics their favorite subject. There are 17 such students.

2. To answer the second question, we use the “IF” operation. Let's write the following expression in cell E2: =IF(A2="Y";D2;0), as a result of applying this operation to the range of cells E2:E1001, we obtain a column in which only the scores of students in the Southern District are recorded. Having summed up the values ​​in the cells, we get the sum of the students’ points: 66,238. Next, let’s count the number of students in the Southern District using the command =COUNTIF(A2:A1001,"Y"), we get: 126. Dividing the sum of points by the number of students, we get: 525.69 - the required average score.

Answer: 1) 17; 2) 525.70.

20.1

Robot has nine commands. Four commands are order commands:

up down left right

When executing any of these commands, the Robot moves one cell, respectively: up, down ↓, left ←, right →. If the Robot receives a command to move through a wall, it will collapse. Robot also has a team paint over

Four more commands are condition checking commands. These commands check if the path is clear for the Robot in each of four possible directions:

top free bottom free left free right free

These commands can be used in conjunction with the condition " if", having the following form:

If condition That
sequence of commands
All

Here condition– one of the condition checking commands.

Command Sequence- this is one or more any commands-orders.

For example, to move one cell to the right, if there is no wall on the right and paint the cell, you can use the following algorithm:

if the right is free then
right
paint over
All

In one condition, you can use several condition checking commands using logical connectives and, or, not, for example:


right
All

« Bye", having the following form:
nts for now condition
sequence of commands
kts

nts the right is free for now
right
kts

Complete the task.

There is a wall on an endless field. The wall consists of three consecutive segments: to the right, down, to the right, all segments of unknown length. The robot is in a cage located directly on top of the left end

first segment. The figure shows one of the possible ways to position the walls and the Robot (the Robot is designated by the letter “P”).

Write an algorithm for the Robot that paints all the cells located immediately to the right of the second segment and above the third. The robot must paint only cells that satisfy this condition. For example, for the picture above, the Robot must color in the following cells (see picture).

The final location of the Robot can be arbitrary. The algorithm must solve the problem for an arbitrary field size and any admissible arrangement of walls inside a rectangular field. When executing the algorithm, the Robot should not be destroyed.

20.2 Write a program that, in a sequence of natural numbers, finds the arithmetic mean of numbers that are multiples of 8, or reports that there are no such numbers (outputs “NO”). The program receives natural numbers as input, the number of entered numbers is unknown, the sequence of numbers ends with the number 0 (0 is a sign of the end of the input, not included in the sequence).

The number of numbers does not exceed 100. The entered numbers do not exceed 300. The program should output the arithmetic mean of numbers that are multiples of 8, or output “NO” if there are no such numbers. Display the value accurate to tenths.

Example of the program:

Input data Output
8
122
64
16
0
29,3
111
1
0
NO

Explanation.

20.1 The performer’s commands will be written in bold, and comments that explain the algorithm and are not part of it will be written in italics. The beginning of a comment will be denoted by the symbol “|”.

| Move to the right along the upper horizontal wall until it ends
nts not yet (bottom free)
right
kts
| Move down along the vertical wall and paint the cells
nts the bottom is free for now
down
paint over
kts
| Move to the right along the horizontal wall and paint the cells
nts not yet (bottom free)
paint over
right
kts

20.2 The solution is a program written in any programming language. An example of a correct solution written in Pascal:

var a, s, n: integer;
begin
s:=0; n:=0;
readln(a);
while a<>0 do begin
if (a mod 8 = 0) then
begin
s:= s + a;
n:= n + 1;
end;
readln(a); end;
if n > 0 then writeln(s/n:5:1)
else writeln('NO');
end.

Other solutions are also possible. To check the correct operation of the program, you must use

the following tests:

Input data Output
1 2
222
0
NO
2 16
0
16.0
3 1632
64
8
8
5
0
25.6

59. Choose ONE of the tasks below: 20.1 or 20.2.

20.1 Performer Robot can navigate through a labyrinth drawn on a plane divided into cells. Between adjacent (on the sides) cells there may be a wall through which the Robot cannot pass.

Robot has nine commands. Four commands are order commands:

up down left right

When executing any of these commands, the Robot moves one cell, respectively: up down ↓, left ←, right →. If the Robot receives a command to move through a wall, it will collapse.

Robot also has a team paint over, in which the cell in which the Robot is currently located is painted over.

Four more commands are condition checking commands. These commands check if the path is clear for the Robot in each of four possible directions:

These commands can be used in conjunction with a condition "If", having the following form:

If condition That
sequence of commands
All

Here condition- one of the commands for checking a condition. Command Sequence- this is one or more any commands-orders. For example, to move one cell to the right, if there is no wall on the right, and paint the cell, you can use the following algorithm:

if the right is free then
right
paint over
All

In one condition, you can use several condition checking commands using logical connectives and, or, not, For example:

if (right is free) and (not below is free) then
right
All

You can use a loop to repeat a sequence of commands "Bye", having the following form:

nts for now condition
sequence of commands
kts

For example, to move to the right while it is possible, you can use the following algorithm:

nts the right is free for now
right
kts

Complete the task.

The endless field has horizontal and vertical walls. The left end of the horizontal wall is connected to the bottom end of the vertical wall. The lengths of the walls are unknown. There is exactly one passage in the vertical wall; the exact location of the passage and its width are unknown. The robot is in a cage located directly above the horizontal wall at its right end. The figure shows one of the possible ways to position the walls and the Robot (the Robot is designated by the letter “P”).

Write an algorithm for the Robot that paints all the cells located directly to the left and right of a vertical wall.

The robot must paint only cells that satisfy this condition. For example, for the picture shown on the right, the Robot must paint over the following cells (see picture).

The final location of the Robot can be arbitrary. When executing the algorithm, the Robot should not be destroyed. The algorithm must solve the problem for an arbitrary field size and any permissible wall arrangement.

The algorithm can be executed in a formal executor environment or written in a text editor.

20.2 Write a program that, in a sequence of natural numbers, determines the minimum number ending in 4. The program receives as input the number of numbers in the sequence, and then the numbers themselves. The sequence always contains a number ending in 4. The number of numbers does not exceed 1000. The entered numbers do not exceed 30,000. The program must output one number - the minimum number
ending in 4.

Example of the program:

Input data Output
14

Explanation.20.1 The performer's commands will be written in bold, and comments that explain the algorithm and are not part of it will be written in italics. The beginning of a comment will be denoted by the symbol “|”.

||Move left until we reach a vertical wall.
nts the left is free for now
left
kts

|Move up until we reach the passage in the wall, and paint over the cells.
nts not free on the left yet
paint over
up
kts


nts the left is free for now
up
kts

|Move up to the end of the wall and paint over the cells.
nts not free on the left yet
paint over
up
kts

|We go around the wall.
left
down

|Move down until we reach the passage in the wall, and paint over the cells.
nts not free on the right yet
paint over
down
kts

|Move further to the vertical wall.
nts the right is free for now
down
kts

|Move down to the end of the wall and paint over the cells.
nts not free on the right yet
paint over
down
kts

Other solutions are also possible. It is allowed to use a different syntax for the performer's instructions,

more familiar to students. It is allowed to have some syntax errors that do not distort the intent of the author of the solution.

20.2 The solution is a program written in any programming language. An example of a correct solution written in Pascal:

Var n,i,a,min: integer;
begin
readln(n);
min:= 30001;
for i:= 1 to n do
begin
readln(a);
if (a mod 10 = 4) and (a< min)
then min:= a;
end;
writeln(min)
end.

Other solutions are also possible. To check the correct operation of the program, you must use the following tests:

Input data Output
1 4
2 14
3 4

60. Choose ONE of the tasks below: 20.1 or 20.2.

20.1 Performer Robot can navigate through a labyrinth drawn on a plane divided into cells. Between adjacent (on the sides) cells there may be a wall through which the Robot cannot pass. Robot has nine commands. Four commands are order commands:

up down left right

When executing any of these commands, the Robot moves one cell, respectively: up down ↓, left ←, right →. If the Robot receives a command to move through a wall, it will collapse. Robot also has a team paint over, in which the cell in which the Robot is currently located is painted over.

Four more commands are condition checking commands. These commands check if the path is clear for the Robot in each of four possible directions:

top free bottom free left free right free

These commands can be used in conjunction with a condition "If", having the following form:

If condition That
sequence of commands
All

Here condition- one of the commands for checking a condition. Command Sequence- this is one or more any commands-orders. For example, to move one cell to the right, if there is no wall on the right, and paint the cell, you can use the following algorithm:

if the right is free then
right
paint over
All

In one condition, you can use several condition checking commands using logical connectives and, or, not, For example:

if (right is free) and (not below is free) then
right
All

You can use a loop to repeat a sequence of commands "Bye", having the following form:

nts for now condition
sequence of commands
kts

For example, to move to the right while it is possible, you can use the following algorithm:

nts the right is free for now
right
kts

Complete the task.

There is a staircase on the endless field. First the staircase goes up from left to right, then it goes down also from left to right. To the right of the descent the staircase turns into a horizontal wall. The height of each step is 1 square, the width is 1 square. The number of steps leading up and the number of steps leading down is unknown. Between the descent and ascent the width of the area is 1 square. The robot is in a cage located at the beginning of the descent. The figure shows one of the possible ways to arrange the walls and the Robot (the Robot is designated by the letter “P”).

Write an algorithm for the Robot that paints all the cells located directly above the stairs. The robot must paint only cells that satisfy this condition. For example, for the picture above, the Robot must color in the following cells (see picture).

The final location of the Robot can be arbitrary. The algorithm must solve the problem for an arbitrary field size and any admissible arrangement of walls inside a rectangular field. When executing the algorithm, the Robot must not be destroyed; the execution of the algorithm must be completed. The algorithm can be executed in a formal executor environment or written in a text editor. Save the algorithm in a text file.

20.2 Enter 8 positive integers using the keyboard. Determine how many of them are divisible by 3 and end in 4. The program should print one number: the number of numbers that are multiples of 3 and end in 4.

Example of the program:

Input data Output
12
14
24
54
44
33
84
114
4

Explanation.20.1 The following algorithm will perform the required task.

nts not free on the right yet
paint over
up
paint over
right
kts

paint over
right

nts the bottom is free for now
paint over
down
paint over
right
kts

20.2 Solution

Var i, n, a: integer;
begin n: = 0;
for i: = 1 to 8 do
begin
readln(a);
if (a mod 3 = 0) and (a mod 10 = 4) then
n: = n + 1 ; end;
writeln(n);
end.

To check the correct operation of the program, you must use the following tests:

Input data Output
1 0
2 1
3 3

OGE assignments in computer science with solutions and answers

1 option
Write a program that, in a sequence of natural numbers, determines the minimum number divisible by 7. The program receives as input the number of numbers in the sequence, and then the numbers themselves. The sequence always contains a number divisible by 7. The number of numbers does not exceed 1000. The entered numbers do not exceed 30,000. The program must enter one number - the minimum number divisible by 7.
Example of the program:
Input data: 3,11,14,77
Output: 14
Option 2
Write a program that, in a sequence of natural numbers, determines the maximum even number. The program receives as input the number of numbers in the sequence, and then the numbers themselves. There is always an even number in the sequence. The number of numbers does not exceed 1000. The entered numbers do not exceed 30,000. The program must enter one number - the maximum even number.
Example of the program:
Input numbers: 3,10,99,42
Weekend dates:42
Option 3
Write a program that, in a sequence of natural numbers, determines the minimum number that is a multiple of 16. The program receives as input the number of numbers in the sequence, and then the numbers themselves. The sequence always contains a number that is a multiple of 16. The number of numbers does not exceed 1000. The entered numbers do not exceed 30,000. The program must enter one number - the minimum number - the minimum number that is a multiple of 16.
Example of the program:
Input numbers: 3,64,48,80
Weekend dates:48
Option 4
Write a program that, in a sequence of natural numbers, determines the maximum number ending in 1.
The program receives as input the number of numbers in the sequence, and then the numbers themselves. The sequence always contains a number ending in 1. The number of numbers does not exceed 1000. The entered numbers do not exceed 30,000. The program must enter one number - the maximum number ending in 1.
Example of the program:
Input numbers:3,11,21,31
Weekend dates:31
Option 5
Write a program that, in a sequence of natural numbers, determines the number of all numbers that are multiples of 6 and ending in 0.
The program receives natural numbers as input, the number of entered numbers is unknown, the sequence of numbers ends with the number 0 (0 is a sign of the end of the input, not included in the sequence). The number of numbers does not exceed 1000. The entered numbers do not exceed 30,000. The program should output one number: the number of all numbers in the sequence that are multiples of 6 and ending in 0.
Example of the program:
Input numbers:20,6,120,100,150,0
Output numbers:2

Option 6
Write a program that, in a sequence of natural numbers, determines the number of all numbers that are multiples of 7 and ending in 5. The program receives natural numbers as input, the number of entered numbers is unknown, the sequence of numbers ends with the number 0 (0 is a sign of the end of the input, not included in the sequence). The number of numbers does not exceed 1000. The entered numbers do not exceed 30,000. The program should output one number: the number of all numbers in the sequence that are multiples of 7 and ending in 5.
Example of the program:

Output numbers:2
Option 7
Write a program that, in a sequence of natural numbers, determines the sum of all numbers that are multiples of 7 and ending in 5. The program receives natural numbers as input, the number of entered numbers is unknown, the sequence of numbers ends with the number 0 (0 is a sign of the end of the input, not included in the sequence). The number of numbers does not exceed 1000. The entered numbers do not exceed 30,000. The program must output one number: the sum of all numbers in the sequence that are multiples of 7 and ending in 5.
Example of the program:
Input numbers:35,49,55,105,155,0
Output numbers:140
Option 8
Write a program that, in a sequence of natural numbers, determines the sum of all numbers that are multiples of 3 and ending in 6. The program receives natural numbers as input, the number of entered numbers is unknown, the sequence of numbers ends with the number 0 (0 is a sign of the end of the input, not included in the sequence). The number of numbers does not exceed 1000. The entered numbers do not exceed 30,000. The program must output one number: the sum of all numbers in the sequence that are multiples of 3 and ending in 6.
Example of the program:
Input numbers:36,56,33,126,3,0
Output numbers:162
Option 9
Write a program that, in a sequence of natural numbers, determines the sum and quantity of all even numbers divisible by 5. The program receives natural numbers as input, the number of entered numbers is unknown, the sequence of numbers ends with the number 0 (0 is a sign of the end of the input, not included in the sequence). The number of numbers does not exceed 1000. The entered numbers do not exceed 30,000. The program should output two numbers: the sum of the sequence and the number of even numbers divisible by 5.
Example of the program:
Input numbers:4,60,15,0
Output numbers:79.1
Option 10
Write a program that, in a sequence of natural numbers, determines their number and the sum of even numbers.
The program receives natural numbers as input, the number of entered numbers is unknown, the sequence of numbers ends with the number 0 (0 is a sign of the end of the input, not included in the sequence). The number of numbers does not exceed 1000. The entered numbers do not exceed 30,000. The program must output two numbers: the length of the sequence and the sum of fair numbers.
Example of the program:
Input numbers:4,60,15,0 Output numbers:3,64

This section provides you with information on the 9th grade exam "Informatics" in the OGE format. Demo versions, theory guides, exam specifications and practice tests are available. You can find information about the exam format below.

Exam Information

The computer science exam consists of two parts and 20 tasks.

First part contains 18 tasks of basic and advanced difficulty levels

  • 6 tasks with selection and recording of the answer in the form of one digit
  • 12 tasks, implying that the examinee independently formulates and writes down the answer in the form of a sequence of characters

Second part contains 2 tasks of high difficulty level.

The tasks of the second part involve practical work by students on a computer using special software. The result of each task is a separate file. Task 20 is given in two versions: 20.1 and 20.2; The examinee must choose one of the options for the task.

Among tasks 1–6, tasks from all thematic blocks are presented, except for tasks on the topic “Organization of the information environment, information search”; among tasks 7–18 there are tasks on all topics except the topic “Design and Modeling”.

The tasks in Part 2 are aimed at testing practical skills in working with information in text and tabular forms, as well as the ability to implement a complex algorithm. In this case, task 20 is given in two versions: task 20.1 involves developing an algorithm for a formal executor, task 20.2 is to develop and write an algorithm in a programming language. The examinee independently chooses one of two options for the task, depending on whether he has studied any programming language.

Distribution of tasks by parts of the examination paper


Option 1

19. 1)38% 2)55

20. Task C2 No. 100

Criteria for assessing the completion of task 20.1

Points

The algorithm works correctly for all valid input data

For all acceptable initial data, the following is true: 1) execution of the algorithm is completed, and the Robot does not crash; 2) no more than 10 extra cells are painted over; 3) no more than 10 cells remained unpainted from among those that should have been shaded

The task was completed incorrectly, i.e. the conditions for giving 1 or 2 points were not met

Maximum score

Criteria for assessing the completion of task 20.2

Points

The correct solution has been proposed. The program works correctly on all the above tests. The program can be written in any programming language

The program gives an incorrect answer on one of the tests above

The program gives incorrect answers on tests, different from those described in the criteria for 1 point

Maximum score

Performer Robot can navigate through a labyrinth drawn on a plane divided into cells. Between adjacent (on the sides) cells there may be a wall through which the Robot cannot pass. Robot has nine commands. Four commands are order commands:

up down left right

When any of these commands is executed, the Robot moves one cell accordingly: up down ↓ , left ← , right → . If the Robot receives a command to move through a wall, it will collapse. Robot also has a team paint over , in which the cell in which the Robot is currently located is painted over.

Four more commands are condition checking commands. These commands check if the path is clear for the Robot in each of four possible directions:

top free bottom free left free right free

These commands can be used in conjunction with a condition"If" , having the following form:

if condition then

sequence of commands

All

Here's the condition - one of the commands for checking a condition.Command Sequence- this is one or more any commands-orders. For example, to move one cell to the right, if there is no wall on the right, and paint the cell, you can use the following algorithm:

if the right is free then

right

paint over

All

In one condition, you can use several condition checking commands using logical connectives and, or, not, for example:

if (right is free) and (not below is free) then

right

All

You can use a loop to repeat a sequence of commands"Bye" , having the following form:

no condition yet

sequence of commands

kts

For example, to move to the right while it is possible, you can use the following algorithm:

nts the right is free for now

right

kts

Complete the task.

The endless field has horizontal and vertical walls. The right end of the horizontal wall is connected to the bottom end of the vertical wall. The lengths of the walls are unknown. Each wall has exactly one passage, the exact location of the passage and its width are unknown. The robot is in a cage located directly to the right of the vertical wall at its upper end. The figure shows one of the possible ways to position the walls and the Robot (the Robot is designated by the letter “P”).

Write an algorithm for the Robot that paints all the cells located directly above the horizontal wall and to the left of the vertical wall. The passages must remain unpainted. The robot must paint only cells that satisfy this condition. For example, for the picture above, the Robot must color in the following cells (see picture).

When executing the algorithm, the Robot must not be destroyed; the execution of the algorithm must be completed. The final location of the Robot can be arbitrary. The algorithm must solve the problem for any feasible arrangement of walls and any location and size of passages inside the walls. The algorithm can be executed in a formal executor environment or written in a text editor. Save the algorithm in a text file.

20.2 Write a program that, in a sequence of natural numbers, determines the sum of numbers that are multiples of 3. The program receives as input the number of numbers in the sequence, and then the numbers themselves. The sequence always contains a number that is a multiple of 3. The number of numbers does not exceed 100. The entered numbers do not exceed 300. The program must output one number - the sum of numbers that are multiples of 3.

Example of the program:

Input data

Output

3
12
25
9


Explanation.

The following algorithm will perform the required task.

nc

until the left is free

paint over

down