Summary Files Commits Branches @commit @diff @stats
path: root / src
diff options
context:
space:
mode:
Commit606bcff5657cca341a77449e0ff4d1f0129fb9ec (patch)
Author
 Syndamia <kamen@syndamia.com>
2025-11-06 19:16:40 +0200
Committer
 Syndamia <kamen@syndamia.com>
2025-11-06 19:16:40 +0200
Files6250d1c99326051722d3650280b2f29234d36abe /src
syndamia.com-606bcff5657cca341a77449e0ff4d1f0129fb9ec.tar
syndamia.com-606bcff5657cca341a77449e0ff4d1f0129fb9ec.tar.gz
syndamia.com-606bcff5657cca341a77449e0ff4d1f0129fb9ec.zip
Parent8b262046665b76926dc91ef92d64a2ea20d1e9c9 (diff)
feat(teaching/upp-2025/w06): Add solutions
1 files changed, 35 insertions, 1 deletions
-rw-r--r--src/teaching/upp-2025/week06/index.du36
diff --git a/src/teaching/upp-2025/week06/index.du b/src/teaching/upp-2025/week06/index.du
index 219fdc5..d8c2666 100644
--- a/src/teaching/upp-2025/week06/index.du
+++ b/src/teaching/upp-2025/week06/index.du
@@ -2,7 +2,7 @@
'define expected-reading 10 min
'define created 01 November 2025
-'define edited 05 November 2025
+'define edited 06 November 2025
[$pagenav]
GitHub Classroom: [url https://classroom.github.com/a/JSB1UK_f]
@@ -11,6 +11,8 @@ GitHub Classroom: [url https://classroom.github.com/a/JSB1UK_f]
### Задача 1
+.solution-link [url https://github.com/Syndamia/upp-2025-solutions/tree/main/Week06/Exercise01.cpp Решение]
+
През 1837 година, [url https://en.wikipedia.org/wiki/Charles_Babbage Чарлз Бабидж] пита въпроса:
.quote
@@ -24,6 +26,8 @@ What is the smallest positive integer whose square ends in the digits 269,696?
### Задача 2
+.solution-link [url https://github.com/Syndamia/upp-2025-solutions/tree/main/Week06/Exercise02.cpp Решение]
+
От входа получавате 8 цели положителни числа.
Трябва да изкарате най-голямото общо делимо между всички тези числа.
@@ -34,6 +38,8 @@ What is the smallest positive integer whose square ends in the digits 269,696?
### Задача 3
+.solution-link [url https://github.com/Syndamia/upp-2025-solutions/tree/main/Week06/Exercise03.cpp Решение]
+
Получавате цяло положително число.
В него трябва да замените всички срещания на най-срещаната цифра с 0.
@@ -51,6 +57,8 @@ What is the smallest positive integer whose square ends in the digits 269,696?
### Задача 4
+.solution-link [url https://github.com/Syndamia/upp-2025-solutions/tree/main/Week06/Exercise04.cpp Решение]
+
Получавате една редица от 15 цели числа и след това втора редица с 5 цели уникални числа.
Трябва да върнете броя срещания в първата редица на всяко от числата във втората редица.
@@ -60,6 +68,8 @@ What is the smallest positive integer whose square ends in the digits 269,696?
### Задача 5
+.solution-link [url https://github.com/Syndamia/upp-2025-solutions/tree/main/Week06/Exercise05.cpp Решение]
+
От входа получавате две реални числа: координати на точка в равнината.
Спрямо следното изображение:
@@ -87,6 +97,8 @@ What is the smallest positive integer whose square ends in the digits 269,696?
### Задача 6
+.solution-link [url https://github.com/Syndamia/upp-2025-solutions/tree/main/Week06/Exercise06.cpp Решение]
+
От входа получавате цяло положително число.
Трябва да върнете дали то е [url https://en.wikipedia.org/wiki/Happy_number щастливо].
@@ -108,6 +120,8 @@ What is the smallest positive integer whose square ends in the digits 269,696?
### Задача 7
+.solution-link [url https://github.com/Syndamia/upp-2025-solutions/tree/main/Week06/Exercise07.cpp Решение]
+
От входа получавате 6 реални числа.
Пресметнете съответните 6 [url https://en.wikipedia.org/wiki/Prefix_sum префиксни суми] и ги изкарайте.
@@ -121,6 +135,8 @@ What is the smallest positive integer whose square ends in the digits 269,696?
### Задача 8
+.solution-link [url https://github.com/Syndamia/upp-2025-solutions/tree/main/Week06/Exercise08.cpp Решение]
+
От входа получавате две реални числа: координати на точка в равнината.
Спрямо следното изображение:
@@ -149,6 +165,8 @@ What is the smallest positive integer whose square ends in the digits 269,696?
### Задача 9
+.solution-link [url https://github.com/Syndamia/upp-2025-solutions/tree/main/Week06/Exercise09.cpp Решение]
+
От входа получавате 10 цели числа.
Трябва да върнете дали сред тях същестуват три числа (на различни позиции), чиято сума е равна на 0.
@@ -159,6 +177,8 @@ What is the smallest positive integer whose square ends in the digits 269,696?
### Задача 10
+.solution-link [url https://github.com/Syndamia/upp-2025-solutions/tree/main/Week06/Exercise10.cpp Решение]
+
От входа получавате четири трицифрени цели неотрицателн числа.
Трябва да върнете най-голямото възможно цяло число, което се получава след "слепване" на тези числа.
@@ -171,6 +191,8 @@ What is the smallest positive integer whose square ends in the digits 269,696?
### Задача 11
+.solution-link [url https://github.com/Syndamia/upp-2025-solutions/tree/main/Week06/Exercise11.cpp Решение]
+
От входа получавате две реални числа: координати на точка в равнината.
Спрямо следното изображение:
@@ -199,6 +221,8 @@ What is the smallest positive integer whose square ends in the digits 269,696?
### Задача 12
+.solution-link [url https://github.com/Syndamia/upp-2025-solutions/tree/main/Week06/Exercise12.cpp Решение]
+
От входа получавате цяло неотрицателно число.
Трябва да върнете дали е [url https://en.wikipedia.org/wiki/Sum-product_number число на "сума-произведение"].
@@ -213,6 +237,8 @@ What is the smallest positive integer whose square ends in the digits 269,696?
### Задача 13
+.solution-link [url https://github.com/Syndamia/upp-2025-solutions/tree/main/Week06/Exercise13.cpp Решение]
+
От входа получавате цяло положително число.
Трябва да върнете всички негови делители.
@@ -225,6 +251,8 @@ What is the smallest positive integer whose square ends in the digits 269,696?
### Задача 14
+.solution-link [url https://github.com/Syndamia/upp-2025-solutions/tree/main/Week06/Exercise14.cpp Решение]
+
От входа получавате две цели неотрицателни числа.
Трябва да намерите [url https://en.wikipedia.org/wiki/Tetration тетрацията] на първото числото на степен второто число.
@@ -242,6 +270,8 @@ What is the smallest positive integer whose square ends in the digits 269,696?
### Задача 15
+.solution-link [url https://github.com/Syndamia/upp-2025-solutions/tree/main/Week06/Exercise15.cpp Решение]
+
От входа получавате 8 цели неотрицателни числа.
Трябва да върнете най-малкото общо кратно на всеки две съседни числа.
@@ -274,6 +304,8 @@ What is the smallest positive integer whose square ends in the digits 269,696?
### Задача 17
+.solution-link [url https://github.com/Syndamia/upp-2025-solutions/tree/main/Week06/Exercise17.cpp Решение]
+
От входа получавате две естествени числа, `[a]` и `[b]`.
Трябва да върнете дали `[a]` е [url https://en.wikipedia.org/wiki/Unitary_divisor унитарен делител] на `[b]`.
@@ -288,6 +320,8 @@ What is the smallest positive integer whose square ends in the digits 269,696?
### Задача 18
+.solution-link [url https://github.com/Syndamia/upp-2025-solutions/tree/main/Week06/Exercise18.cpp Решение]
+
От входа получавате 10 реални числа.
Трябва да върнете най-голямата възможна сума, получена чрез събиране на колкото и дълга =[последователна]= редица от елементи.