English
Tasks
Complete the task of the chosen difficulty level for your variant number.
Each level contains a complete input and output contract. Simple numerical calculations are acceptable for the first assignment; multiline validation is explained when presenting your work.
Variants
Variant 1. Fuel consumption
1. Initial level. Create a Kotlin/JVM program: set in code distance d 1–10000 km and fuel l 0.1–1000 L; print consumption 100*l/d in L/100 km. Print fractional results with two decimal places and integers without a fractional part. Submit a Gradle project and a manual reference calculation.
2. Basic level. Create a Kotlin/JVM program: read from the keyboard distance d 1–10000 km and fuel l 0.1–1000 L; print consumption 100*l/d in L/100 km. Print fractional results with two decimal places and integers without a fractional part. Document the valid input format in the README, check two cases, and make three local Git commits.
3. Advanced level. Create a Kotlin/JVM program: read from command-line arguments distance d 1–10000 km and fuel l 0.1–1000 L; print consumption 100*l/d in L/100 km. Print fractional results with two decimal places and integers without a fractional part. Check argument count, conversion, finiteness, and bounds; explain invalid input without printing a total. Submit a Gradle project, a README, three commits, and a table of normal, boundary, and invalid input. Add CLI arguments in key=value format and --help; with no arguments, read the same fields from the keyboard. Print a labeled tabular report with a total; send errors to stderr. Exit codes: 0 for success or help, 2 for invalid input, and 1 for an operational failure.
Variant 2. Currency exchange
1. Initial level. Create a Kotlin/JVM program: set in code amount s 0–100000 UAH and an educational exchange rate r 1–100 UAH/conventional unit; print s/r conventional units. Print fractional results with two decimal places and integers without a fractional part. Submit a Gradle project and a manual reference calculation.
2. Basic level. Create a Kotlin/JVM program: read from the keyboard amount s 0–100000 UAH and an educational exchange rate r 1–100 UAH/conventional unit; print s/r conventional units. Print fractional results with two decimal places and integers without a fractional part. Document the valid input format in the README, check two cases, and make three local Git commits.
3. Advanced level. Create a Kotlin/JVM program: read from command-line arguments amount s 0–100000 UAH and an educational exchange rate r 1–100 UAH/conventional unit; print s/r conventional units. Print fractional results with two decimal places and integers without a fractional part. Check argument count, conversion, finiteness, and bounds; explain invalid input without printing a total. Submit a Gradle project, a README, three commits, and a table of normal, boundary, and invalid input. Add CLI arguments in key=value format and --help; with no arguments, read the same fields from the keyboard. Print a labeled tabular report with a total; send errors to stderr. Exit codes: 0 for success or help, 2 for invalid input, and 1 for an operational failure.
Variant 3. Body mass index
1. Initial level. Create a Kotlin/JVM program: set in code mass m 1–300 kg and height h 0.5–2.5 m; print the educational index m/(h*h), without medical interpretation. Print fractional results with two decimal places and integers without a fractional part. Submit a Gradle project and a manual reference calculation.
2. Basic level. Create a Kotlin/JVM program: read from the keyboard mass m 1–300 kg and height h 0.5–2.5 m; print the educational index m/(h*h), without medical interpretation. Print fractional results with two decimal places and integers without a fractional part. Document the valid input format in the README, check two cases, and make three local Git commits.
3. Advanced level. Create a Kotlin/JVM program: read from command-line arguments mass m 1–300 kg and height h 0.5–2.5 m; print the educational index m/(h*h), without medical interpretation. Print fractional results with two decimal places and integers without a fractional part. Check argument count, conversion, finiteness, and bounds; explain invalid input without printing a total. Submit a Gradle project, a README, three commits, and a table of normal, boundary, and invalid input. Add CLI arguments in key=value format and --help; with no arguments, read the same fields from the keyboard. Print a labeled tabular report with a total; send errors to stderr. Exit codes: 0 for success or help, 2 for invalid input, and 1 for an operational failure.
Variant 4. Room renovation
1. Initial level. Create a Kotlin/JVM program: set in code length l and width w 1–100 m, paint consumption c 0.1–2 L/m²; print l*w*c liters of paint for the floor. Print fractional results with two decimal places and integers without a fractional part. Submit a Gradle project and a manual reference calculation.
2. Basic level. Create a Kotlin/JVM program: read from the keyboard length l and width w 1–100 m, paint consumption c 0.1–2 L/m²; print l*w*c liters of paint for the floor. Print fractional results with two decimal places and integers without a fractional part. Document the valid input format in the README, check two cases, and make three local Git commits.
3. Advanced level. Create a Kotlin/JVM program: read from command-line arguments length l and width w 1–100 m, paint consumption c 0.1–2 L/m²; print l*w*c liters of paint for the floor. Print fractional results with two decimal places and integers without a fractional part. Check argument count, conversion, finiteness, and bounds; explain invalid input without printing a total. Submit a Gradle project, a README, three commits, and a table of normal, boundary, and invalid input. Add CLI arguments in key=value format and --help; with no arguments, read the same fields from the keyboard. Print a labeled tabular report with a total; send errors to stderr. Exit codes: 0 for success or help, 2 for invalid input, and 1 for an operational failure.
Variant 5. Temperature
1. Initial level. Create a Kotlin/JVM program: set in code temperature t from −100 to 100 °C; print temperatures 1.8*t+32 °F and t+273.15 K. Print fractional results with two decimal places and integers without a fractional part. Submit a Gradle project and a manual reference calculation.
2. Basic level. Create a Kotlin/JVM program: read from the keyboard temperature t from −100 to 100 °C; print temperatures 1.8*t+32 °F and t+273.15 K. Print fractional results with two decimal places and integers without a fractional part. Document the valid input format in the README, check two cases, and make three local Git commits.
3. Advanced level. Create a Kotlin/JVM program: read from command-line arguments temperature t from −100 to 100 °C; print temperatures 1.8*t+32 °F and t+273.15 K. Print fractional results with two decimal places and integers without a fractional part. Check argument count, conversion, finiteness, and bounds; explain invalid input without printing a total. Submit a Gradle project, a README, three commits, and a table of normal, boundary, and invalid input. Add CLI arguments in key=value format and --help; with no arguments, read the same fields from the keyboard. Print a labeled tabular report with a total; send errors to stderr. Exit codes: 0 for success or help, 2 for invalid input, and 1 for an operational failure.
Variant 6. Duration
1. Initial level. Create a Kotlin/JVM program: set in code an integer number of seconds s 0–1000000; print whole hours, remaining minutes, and seconds. Print fractional results with two decimal places and integers without a fractional part. Submit a Gradle project and a manual reference calculation.
2. Basic level. Create a Kotlin/JVM program: read from the keyboard an integer number of seconds s 0–1000000; print whole hours, remaining minutes, and seconds. Print fractional results with two decimal places and integers without a fractional part. Document the valid input format in the README, check two cases, and make three local Git commits.
3. Advanced level. Create a Kotlin/JVM program: read from command-line arguments an integer number of seconds s 0–1000000; print whole hours, remaining minutes, and seconds. Print fractional results with two decimal places and integers without a fractional part. Check argument count, conversion, finiteness, and bounds; explain invalid input without printing a total. Submit a Gradle project, a README, three commits, and a table of normal, boundary, and invalid input. Add CLI arguments in key=value format and --help; with no arguments, read the same fields from the keyboard. Print a labeled tabular report with a total; send errors to stderr. Exit codes: 0 for success or help, 2 for invalid input, and 1 for an operational failure.
Variant 7. Deposit
1. Initial level. Create a Kotlin/JVM program: set in code educational values p 1–100000 UAH and r 0–20 percent per year; print p*(1+r/100) after one year without fees. Print fractional results with two decimal places and integers without a fractional part. Submit a Gradle project and a manual reference calculation.
2. Basic level. Create a Kotlin/JVM program: read from the keyboard educational values p 1–100000 UAH and r 0–20 percent per year; print p*(1+r/100) after one year without fees. Print fractional results with two decimal places and integers without a fractional part. Document the valid input format in the README, check two cases, and make three local Git commits.
3. Advanced level. Create a Kotlin/JVM program: read from command-line arguments educational values p 1–100000 UAH and r 0–20 percent per year; print p*(1+r/100) after one year without fees. Print fractional results with two decimal places and integers without a fractional part. Check argument count, conversion, finiteness, and bounds; explain invalid input without printing a total. Submit a Gradle project, a README, three commits, and a table of normal, boundary, and invalid input. Add CLI arguments in key=value format and --help; with no arguments, read the same fields from the keyboard. Print a labeled tabular report with a total; send errors to stderr. Exit codes: 0 for success or help, 2 for invalid input, and 1 for an operational failure.
Variant 8. Coffee shop
1. Initial level. Create a Kotlin/JVM program: set in code integer quantity n 1–100 and price c 1–10000 kopiykas; print the total n*c kopiykas. Print fractional results with two decimal places and integers without a fractional part. Submit a Gradle project and a manual reference calculation.
2. Basic level. Create a Kotlin/JVM program: read from the keyboard integer quantity n 1–100 and price c 1–10000 kopiykas; print the total n*c kopiykas. Print fractional results with two decimal places and integers without a fractional part. Document the valid input format in the README, check two cases, and make three local Git commits.
3. Advanced level. Create a Kotlin/JVM program: read from command-line arguments integer quantity n 1–100 and price c 1–10000 kopiykas; print the total n*c kopiykas. Print fractional results with two decimal places and integers without a fractional part. Check argument count, conversion, finiteness, and bounds; explain invalid input without printing a total. Submit a Gradle project, a README, three commits, and a table of normal, boundary, and invalid input. Add CLI arguments in key=value format and --help; with no arguments, read the same fields from the keyboard. Print a labeled tabular report with a total; send errors to stderr. Exit codes: 0 for success or help, 2 for invalid input, and 1 for an operational failure.
Variant 9. Running pace
1. Initial level. Create a Kotlin/JVM program: set in code distance d 0.1–100 km and time t 1–1000 min; print pace t/d min/km and speed 60*d/t km/h. Print fractional results with two decimal places and integers without a fractional part. Submit a Gradle project and a manual reference calculation.
2. Basic level. Create a Kotlin/JVM program: read from the keyboard distance d 0.1–100 km and time t 1–1000 min; print pace t/d min/km and speed 60*d/t km/h. Print fractional results with two decimal places and integers without a fractional part. Document the valid input format in the README, check two cases, and make three local Git commits.
3. Advanced level. Create a Kotlin/JVM program: read from command-line arguments distance d 0.1–100 km and time t 1–1000 min; print pace t/d min/km and speed 60*d/t km/h. Print fractional results with two decimal places and integers without a fractional part. Check argument count, conversion, finiteness, and bounds; explain invalid input without printing a total. Submit a Gradle project, a README, three commits, and a table of normal, boundary, and invalid input. Add CLI arguments in key=value format and --help; with no arguments, read the same fields from the keyboard. Print a labeled tabular report with a total; send errors to stderr. Exit codes: 0 for success or help, 2 for invalid input, and 1 for an operational failure.
Variant 10. Swimming pool
1. Initial level. Create a Kotlin/JVM program: set in code dimensions a,b,c 0.1–100 m and flow rate q 1–1000 L/min; print volume 1000*a*b*c L and filling time in minutes. Print fractional results with two decimal places and integers without a fractional part. Submit a Gradle project and a manual reference calculation.
2. Basic level. Create a Kotlin/JVM program: read from the keyboard dimensions a,b,c 0.1–100 m and flow rate q 1–1000 L/min; print volume 1000*a*b*c L and filling time in minutes. Print fractional results with two decimal places and integers without a fractional part. Document the valid input format in the README, check two cases, and make three local Git commits.
3. Advanced level. Create a Kotlin/JVM program: read from command-line arguments dimensions a,b,c 0.1–100 m and flow rate q 1–1000 L/min; print volume 1000*a*b*c L and filling time in minutes. Print fractional results with two decimal places and integers without a fractional part. Check argument count, conversion, finiteness, and bounds; explain invalid input without printing a total. Submit a Gradle project, a README, three commits, and a table of normal, boundary, and invalid input. Add CLI arguments in key=value format and --help; with no arguments, read the same fields from the keyboard. Print a labeled tabular report with a total; send errors to stderr. Exit codes: 0 for success or help, 2 for invalid input, and 1 for an operational failure.
Variant 11. Electricity
1. Initial level. Create a Kotlin/JVM program: set in code previous a and current b meter readings 0–100000 kWh, b>=a, and rate r 0–100; print consumption b-a and the educational cost calculation (b-a)*r. Print fractional results with two decimal places and integers without a fractional part. Submit a Gradle project and a manual reference calculation.
2. Basic level. Create a Kotlin/JVM program: read from the keyboard previous a and current b meter readings 0–100000 kWh, b>=a, and rate r 0–100; print consumption b-a and the educational cost calculation (b-a)*r. Print fractional results with two decimal places and integers without a fractional part. Document the valid input format in the README, check two cases, and make three local Git commits.
3. Advanced level. Create a Kotlin/JVM program: read from command-line arguments previous a and current b meter readings 0–100000 kWh, b>=a, and rate r 0–100; print consumption b-a and the educational cost calculation (b-a)*r. Print fractional results with two decimal places and integers without a fractional part. Check argument count, conversion, finiteness, and bounds; explain invalid input without printing a total. Submit a Gradle project, a README, three commits, and a table of normal, boundary, and invalid input. Add CLI arguments in key=value format and --help; with no arguments, read the same fields from the keyboard. Print a labeled tabular report with a total; send errors to stderr. Exit codes: 0 for success or help, 2 for invalid input, and 1 for an operational failure.
Variant 12. Equal payments
1. Initial level. Create a Kotlin/JVM program: set in code amount p 1–100000 UAH and number of months n 1–120; print the monthly payment p/n without interest or fees. Print fractional results with two decimal places and integers without a fractional part. Submit a Gradle project and a manual reference calculation.
2. Basic level. Create a Kotlin/JVM program: read from the keyboard amount p 1–100000 UAH and number of months n 1–120; print the monthly payment p/n without interest or fees. Print fractional results with two decimal places and integers without a fractional part. Document the valid input format in the README, check two cases, and make three local Git commits.
3. Advanced level. Create a Kotlin/JVM program: read from command-line arguments amount p 1–100000 UAH and number of months n 1–120; print the monthly payment p/n without interest or fees. Print fractional results with two decimal places and integers without a fractional part. Check argument count, conversion, finiteness, and bounds; explain invalid input without printing a total. Submit a Gradle project, a README, three commits, and a table of normal, boundary, and invalid input. Add CLI arguments in key=value format and --help; with no arguments, read the same fields from the keyboard. Print a labeled tabular report with a total; send errors to stderr. Exit codes: 0 for success or help, 2 for invalid input, and 1 for an operational failure.
Variant 13. Falling
1. Initial level. Create a Kotlin/JVM program: set in code height h 0–1000 m, g=9.81 m/s²; print time sqrt(2h/g) and speed sqrt(2g*h) without resistance. Print fractional results with two decimal places and integers without a fractional part. Submit a Gradle project and a manual reference calculation.
2. Basic level. Create a Kotlin/JVM program: read from the keyboard height h 0–1000 m, g=9.81 m/s²; print time sqrt(2h/g) and speed sqrt(2g*h) without resistance. Print fractional results with two decimal places and integers without a fractional part. Document the valid input format in the README, check two cases, and make three local Git commits.
3. Advanced level. Create a Kotlin/JVM program: read from command-line arguments height h 0–1000 m, g=9.81 m/s²; print time sqrt(2h/g) and speed sqrt(2g*h) without resistance. Print fractional results with two decimal places and integers without a fractional part. Check argument count, conversion, finiteness, and bounds; explain invalid input without printing a total. Submit a Gradle project, a README, three commits, and a table of normal, boundary, and invalid input. Add CLI arguments in key=value format and --help; with no arguments, read the same fields from the keyboard. Print a labeled tabular report with a total; send errors to stderr. Exit codes: 0 for success or help, 2 for invalid input, and 1 for an operational failure.
Variant 14. Bricks
1. Initial level. Create a Kotlin/JVM program: set in code wall area s 1–1000 m² and visible face area b 0.001–1 m²; print ceil(s/b) bricks without joints or cutting. Print fractional results with two decimal places and integers without a fractional part. Submit a Gradle project and a manual reference calculation.
2. Basic level. Create a Kotlin/JVM program: read from the keyboard wall area s 1–1000 m² and visible face area b 0.001–1 m²; print ceil(s/b) bricks without joints or cutting. Print fractional results with two decimal places and integers without a fractional part. Document the valid input format in the README, check two cases, and make three local Git commits.
3. Advanced level. Create a Kotlin/JVM program: read from command-line arguments wall area s 1–1000 m² and visible face area b 0.001–1 m²; print ceil(s/b) bricks without joints or cutting. Print fractional results with two decimal places and integers without a fractional part. Check argument count, conversion, finiteness, and bounds; explain invalid input without printing a total. Submit a Gradle project, a README, three commits, and a table of normal, boundary, and invalid input. Add CLI arguments in key=value format and --help; with no arguments, read the same fields from the keyboard. Print a labeled tabular report with a total; send errors to stderr. Exit codes: 0 for success or help, 2 for invalid input, and 1 for an operational failure.
Variant 15. Screen
1. Initial level. Create a Kotlin/JVM program: set in code pixel counts w,h 1–10000 and diagonal d 1–100 inches; print density sqrt(w*w+h*h)/d pixels/inch. Print fractional results with two decimal places and integers without a fractional part. Submit a Gradle project and a manual reference calculation.
2. Basic level. Create a Kotlin/JVM program: read from the keyboard pixel counts w,h 1–10000 and diagonal d 1–100 inches; print density sqrt(w*w+h*h)/d pixels/inch. Print fractional results with two decimal places and integers without a fractional part. Document the valid input format in the README, check two cases, and make three local Git commits.
3. Advanced level. Create a Kotlin/JVM program: read from command-line arguments pixel counts w,h 1–10000 and diagonal d 1–100 inches; print density sqrt(w*w+h*h)/d pixels/inch. Print fractional results with two decimal places and integers without a fractional part. Check argument count, conversion, finiteness, and bounds; explain invalid input without printing a total. Submit a Gradle project, a README, three commits, and a table of normal, boundary, and invalid input. Add CLI arguments in key=value format and --help; with no arguments, read the same fields from the keyboard. Print a labeled tabular report with a total; send errors to stderr. Exit codes: 0 for success or help, 2 for invalid input, and 1 for an operational failure.
Variant 16. Recipe
1. Initial level. Create a Kotlin/JVM program: set in code mass m 1–10000 g for p 1–100 servings and target q 1–100; print mass m*q/p g. Print fractional results with two decimal places and integers without a fractional part. Submit a Gradle project and a manual reference calculation.
2. Basic level. Create a Kotlin/JVM program: read from the keyboard mass m 1–10000 g for p 1–100 servings and target q 1–100; print mass m*q/p g. Print fractional results with two decimal places and integers without a fractional part. Document the valid input format in the README, check two cases, and make three local Git commits.
3. Advanced level. Create a Kotlin/JVM program: read from command-line arguments mass m 1–10000 g for p 1–100 servings and target q 1–100; print mass m*q/p g. Print fractional results with two decimal places and integers without a fractional part. Check argument count, conversion, finiteness, and bounds; explain invalid input without printing a total. Submit a Gradle project, a README, three commits, and a table of normal, boundary, and invalid input. Add CLI arguments in key=value format and --help; with no arguments, read the same fields from the keyboard. Print a labeled tabular report with a total; send errors to stderr. Exit codes: 0 for success or help, 2 for invalid input, and 1 for an operational failure.
Variant 17. Download
1. Initial level. Create a Kotlin/JVM program: set in code size s 1–100000 MiB and speed v 0.1–1000 MiB/s; print time s/v seconds; use matching units. Print fractional results with two decimal places and integers without a fractional part. Submit a Gradle project and a manual reference calculation.
2. Basic level. Create a Kotlin/JVM program: read from the keyboard size s 1–100000 MiB and speed v 0.1–1000 MiB/s; print time s/v seconds; use matching units. Print fractional results with two decimal places and integers without a fractional part. Document the valid input format in the README, check two cases, and make three local Git commits.
3. Advanced level. Create a Kotlin/JVM program: read from command-line arguments size s 1–100000 MiB and speed v 0.1–1000 MiB/s; print time s/v seconds; use matching units. Print fractional results with two decimal places and integers without a fractional part. Check argument count, conversion, finiteness, and bounds; explain invalid input without printing a total. Submit a Gradle project, a README, three commits, and a table of normal, boundary, and invalid input. Add CLI arguments in key=value format and --help; with no arguments, read the same fields from the keyboard. Print a labeled tabular report with a total; send errors to stderr. Exit codes: 0 for success or help, 2 for invalid input, and 1 for an operational failure.
Variant 18. Tank
1. Initial level. Create a Kotlin/JVM program: set in code radius r and height h 0.1–10 m; print volume PI*r*r*h m³ and liters. Print fractional results with two decimal places and integers without a fractional part. Submit a Gradle project and a manual reference calculation.
2. Basic level. Create a Kotlin/JVM program: read from the keyboard radius r and height h 0.1–10 m; print volume PI*r*r*h m³ and liters. Print fractional results with two decimal places and integers without a fractional part. Document the valid input format in the README, check two cases, and make three local Git commits.
3. Advanced level. Create a Kotlin/JVM program: read from command-line arguments radius r and height h 0.1–10 m; print volume PI*r*r*h m³ and liters. Print fractional results with two decimal places and integers without a fractional part. Check argument count, conversion, finiteness, and bounds; explain invalid input without printing a total. Submit a Gradle project, a README, three commits, and a table of normal, boundary, and invalid input. Add CLI arguments in key=value format and --help; with no arguments, read the same fields from the keyboard. Print a labeled tabular report with a total; send errors to stderr. Exit codes: 0 for success or help, 2 for invalid input, and 1 for an operational failure.
Variant 19. Salary
1. Initial level. Create a Kotlin/JVM program: set in code an educational amount s 0–100000 UAH and a specified deduction r 0–50%; print the remainder s*(1-r/100); this is a synthetic scheme, not current taxation. Print fractional results with two decimal places and integers without a fractional part. Submit a Gradle project and a manual reference calculation.
2. Basic level. Create a Kotlin/JVM program: read from the keyboard an educational amount s 0–100000 UAH and a specified deduction r 0–50%; print the remainder s*(1-r/100); this is a synthetic scheme, not current taxation. Print fractional results with two decimal places and integers without a fractional part. Document the valid input format in the README, check two cases, and make three local Git commits.
3. Advanced level. Create a Kotlin/JVM program: read from command-line arguments an educational amount s 0–100000 UAH and a specified deduction r 0–50%; print the remainder s*(1-r/100); this is a synthetic scheme, not current taxation. Print fractional results with two decimal places and integers without a fractional part. Check argument count, conversion, finiteness, and bounds; explain invalid input without printing a total. Submit a Gradle project, a README, three commits, and a table of normal, boundary, and invalid input. Add CLI arguments in key=value format and --help; with no arguments, read the same fields from the keyboard. Print a labeled tabular report with a total; send errors to stderr. Exit codes: 0 for success or help, 2 for invalid input, and 1 for an operational failure.
Variant 20. Land plot
1. Initial level. Create a Kotlin/JVM program: set in code length a and width b 1–10000 m; print the area in m², ares (100 m²), and hectares (10000 m²). Print fractional results with two decimal places and integers without a fractional part. Submit a Gradle project and a manual reference calculation.
2. Basic level. Create a Kotlin/JVM program: read from the keyboard length a and width b 1–10000 m; print the area in m², ares (100 m²), and hectares (10000 m²). Print fractional results with two decimal places and integers without a fractional part. Document the valid input format in the README, check two cases, and make three local Git commits.
3. Advanced level. Create a Kotlin/JVM program: read from command-line arguments length a and width b 1–10000 m; print the area in m², ares (100 m²), and hectares (10000 m²). Print fractional results with two decimal places and integers without a fractional part. Check argument count, conversion, finiteness, and bounds; explain invalid input without printing a total. Submit a Gradle project, a README, three commits, and a table of normal, boundary, and invalid input. Add CLI arguments in key=value format and --help; with no arguments, read the same fields from the keyboard. Print a labeled tabular report with a total; send errors to stderr. Exit codes: 0 for success or help, 2 for invalid input, and 1 for an operational failure.
Variant 21. Map
1. Initial level. Create a Kotlin/JVM program: set in code length s 0–100 cm and scale denominator m 1–1000000; print the real distance s*m/100000 km. Print fractional results with two decimal places and integers without a fractional part. Submit a Gradle project and a manual reference calculation.
2. Basic level. Create a Kotlin/JVM program: read from the keyboard length s 0–100 cm and scale denominator m 1–1000000; print the real distance s*m/100000 km. Print fractional results with two decimal places and integers without a fractional part. Document the valid input format in the README, check two cases, and make three local Git commits.
3. Advanced level. Create a Kotlin/JVM program: read from command-line arguments length s 0–100 cm and scale denominator m 1–1000000; print the real distance s*m/100000 km. Print fractional results with two decimal places and integers without a fractional part. Check argument count, conversion, finiteness, and bounds; explain invalid input without printing a total. Submit a Gradle project, a README, three commits, and a table of normal, boundary, and invalid input. Add CLI arguments in key=value format and --help; with no arguments, read the same fields from the keyboard. Print a labeled tabular report with a total; send errors to stderr. Exit codes: 0 for success or help, 2 for invalid input, and 1 for an operational failure.
Variant 22. Gravitational force
1. Initial level. Create a Kotlin/JVM program: set in code mass m 0–1000 kg and a given g 0.1–30 m/s²; print force m*g newtons. Print fractional results with two decimal places and integers without a fractional part. Submit a Gradle project and a manual reference calculation.
2. Basic level. Create a Kotlin/JVM program: read from the keyboard mass m 0–1000 kg and a given g 0.1–30 m/s²; print force m*g newtons. Print fractional results with two decimal places and integers without a fractional part. Document the valid input format in the README, check two cases, and make three local Git commits.
3. Advanced level. Create a Kotlin/JVM program: read from command-line arguments mass m 0–1000 kg and a given g 0.1–30 m/s²; print force m*g newtons. Print fractional results with two decimal places and integers without a fractional part. Check argument count, conversion, finiteness, and bounds; explain invalid input without printing a total. Submit a Gradle project, a README, three commits, and a table of normal, boundary, and invalid input. Add CLI arguments in key=value format and --help; with no arguments, read the same fields from the keyboard. Print a labeled tabular report with a total; send errors to stderr. Exit codes: 0 for success or help, 2 for invalid input, and 1 for an operational failure.
Variant 23. Educational energy calculation
1. Initial level. Create a Kotlin/JVM program: set in code power p 0–1000 W and time t 0–10000 s; print energy p*t joules. Print fractional results with two decimal places and integers without a fractional part. Submit a Gradle project and a manual reference calculation.
2. Basic level. Create a Kotlin/JVM program: read from the keyboard power p 0–1000 W and time t 0–10000 s; print energy p*t joules. Print fractional results with two decimal places and integers without a fractional part. Document the valid input format in the README, check two cases, and make three local Git commits.
3. Advanced level. Create a Kotlin/JVM program: read from command-line arguments power p 0–1000 W and time t 0–10000 s; print energy p*t joules. Print fractional results with two decimal places and integers without a fractional part. Check argument count, conversion, finiteness, and bounds; explain invalid input without printing a total. Submit a Gradle project, a README, three commits, and a table of normal, boundary, and invalid input. Add CLI arguments in key=value format and --help; with no arguments, read the same fields from the keyboard. Print a labeled tabular report with a total; send errors to stderr. Exit codes: 0 for success or help, 2 for invalid input, and 1 for an operational failure.
Variant 24. Taxi
1. Initial level. Create a Kotlin/JVM program: set in code distance d 0–1000 km, base fare b 0–1000 UAH, rate r 0–100; print the educational cost b+d*r without additional charges. Print fractional results with two decimal places and integers without a fractional part. Submit a Gradle project and a manual reference calculation.
2. Basic level. Create a Kotlin/JVM program: read from the keyboard distance d 0–1000 km, base fare b 0–1000 UAH, rate r 0–100; print the educational cost b+d*r without additional charges. Print fractional results with two decimal places and integers without a fractional part. Document the valid input format in the README, check two cases, and make three local Git commits.
3. Advanced level. Create a Kotlin/JVM program: read from command-line arguments distance d 0–1000 km, base fare b 0–1000 UAH, rate r 0–100; print the educational cost b+d*r without additional charges. Print fractional results with two decimal places and integers without a fractional part. Check argument count, conversion, finiteness, and bounds; explain invalid input without printing a total. Submit a Gradle project, a README, three commits, and a table of normal, boundary, and invalid input. Add CLI arguments in key=value format and --help; with no arguments, read the same fields from the keyboard. Print a labeled tabular report with a total; send errors to stderr. Exit codes: 0 for success or help, 2 for invalid input, and 1 for an operational failure.
Variant 25. Days
1. Initial level. Create a Kotlin/JVM program: set in code an integer number of days d 0–100000; print whole weeks, remaining days, and hours d*24. Print fractional results with two decimal places and integers without a fractional part. Submit a Gradle project and a manual reference calculation.
2. Basic level. Create a Kotlin/JVM program: read from the keyboard an integer number of days d 0–100000; print whole weeks, remaining days, and hours d*24. Print fractional results with two decimal places and integers without a fractional part. Document the valid input format in the README, check two cases, and make three local Git commits.
3. Advanced level. Create a Kotlin/JVM program: read from command-line arguments an integer number of days d 0–100000; print whole weeks, remaining days, and hours d*24. Print fractional results with two decimal places and integers without a fractional part. Check argument count, conversion, finiteness, and bounds; explain invalid input without printing a total. Submit a Gradle project, a README, three commits, and a table of normal, boundary, and invalid input. Add CLI arguments in key=value format and --help; with no arguments, read the same fields from the keyboard. Print a labeled tabular report with a total; send errors to stderr. Exit codes: 0 for success or help, 2 for invalid input, and 1 for an operational failure.
Variant 26. Conductor
1. Initial level. Create a Kotlin/JVM program: set in code resistance r 0.1–10000 ohms and voltage u 0–1000 V; print current u/r A and power u*u/r W. Print fractional results with two decimal places and integers without a fractional part. Submit a Gradle project and a manual reference calculation.
2. Basic level. Create a Kotlin/JVM program: read from the keyboard resistance r 0.1–10000 ohms and voltage u 0–1000 V; print current u/r A and power u*u/r W. Print fractional results with two decimal places and integers without a fractional part. Document the valid input format in the README, check two cases, and make three local Git commits.
3. Advanced level. Create a Kotlin/JVM program: read from command-line arguments resistance r 0.1–10000 ohms and voltage u 0–1000 V; print current u/r A and power u*u/r W. Print fractional results with two decimal places and integers without a fractional part. Check argument count, conversion, finiteness, and bounds; explain invalid input without printing a total. Submit a Gradle project, a README, three commits, and a table of normal, boundary, and invalid input. Add CLI arguments in key=value format and --help; with no arguments, read the same fields from the keyboard. Print a labeled tabular report with a total; send errors to stderr. Exit codes: 0 for success or help, 2 for invalid input, and 1 for an operational failure.
Variant 27. Photos
1. Initial level. Create a Kotlin/JVM program: set in code integer counts n 0–10000 photos and k 1–100 photos per sheet; print the minimum number of sheets (n+k-1)/k. Print fractional results with two decimal places and integers without a fractional part. Submit a Gradle project and a manual reference calculation.
2. Basic level. Create a Kotlin/JVM program: read from the keyboard integer counts n 0–10000 photos and k 1–100 photos per sheet; print the minimum number of sheets (n+k-1)/k. Print fractional results with two decimal places and integers without a fractional part. Document the valid input format in the README, check two cases, and make three local Git commits.
3. Advanced level. Create a Kotlin/JVM program: read from command-line arguments integer counts n 0–10000 photos and k 1–100 photos per sheet; print the minimum number of sheets (n+k-1)/k. Print fractional results with two decimal places and integers without a fractional part. Check argument count, conversion, finiteness, and bounds; explain invalid input without printing a total. Submit a Gradle project, a README, three commits, and a table of normal, boundary, and invalid input. Add CLI arguments in key=value format and --help; with no arguments, read the same fields from the keyboard. Print a labeled tabular report with a total; send errors to stderr. Exit codes: 0 for success or help, 2 for invalid input, and 1 for an operational failure.
Variant 28. Route
1. Initial level. Create a Kotlin/JVM program: set in code distances d1,d2 1–1000 km and speeds v1,v2 1–200 km/h; print average speed (d1+d2)/(d1/v1+d2/v2). Print fractional results with two decimal places and integers without a fractional part. Submit a Gradle project and a manual reference calculation.
2. Basic level. Create a Kotlin/JVM program: read from the keyboard distances d1,d2 1–1000 km and speeds v1,v2 1–200 km/h; print average speed (d1+d2)/(d1/v1+d2/v2). Print fractional results with two decimal places and integers without a fractional part. Document the valid input format in the README, check two cases, and make three local Git commits.
3. Advanced level. Create a Kotlin/JVM program: read from command-line arguments distances d1,d2 1–1000 km and speeds v1,v2 1–200 km/h; print average speed (d1+d2)/(d1/v1+d2/v2). Print fractional results with two decimal places and integers without a fractional part. Check argument count, conversion, finiteness, and bounds; explain invalid input without printing a total. Submit a Gradle project, a README, three commits, and a table of normal, boundary, and invalid input. Add CLI arguments in key=value format and --help; with no arguments, read the same fields from the keyboard. Print a labeled tabular report with a total; send errors to stderr. Exit codes: 0 for success or help, 2 for invalid input, and 1 for an operational failure.
Variant 29. Gravel
1. Initial level. Create a Kotlin/JVM program: set in code length l and width w 0.1–100 m, thickness h 0.01–1 m; print volume l*w*h m³ and mass using an educational density of 1600 kg/m³. Print fractional results with two decimal places and integers without a fractional part. Submit a Gradle project and a manual reference calculation.
2. Basic level. Create a Kotlin/JVM program: read from the keyboard length l and width w 0.1–100 m, thickness h 0.01–1 m; print volume l*w*h m³ and mass using an educational density of 1600 kg/m³. Print fractional results with two decimal places and integers without a fractional part. Document the valid input format in the README, check two cases, and make three local Git commits.
3. Advanced level. Create a Kotlin/JVM program: read from command-line arguments length l and width w 0.1–100 m, thickness h 0.01–1 m; print volume l*w*h m³ and mass using an educational density of 1600 kg/m³. Print fractional results with two decimal places and integers without a fractional part. Check argument count, conversion, finiteness, and bounds; explain invalid input without printing a total. Submit a Gradle project, a README, three commits, and a table of normal, boundary, and invalid input. Add CLI arguments in key=value format and --help; with no arguments, read the same fields from the keyboard. Print a labeled tabular report with a total; send errors to stderr. Exit codes: 0 for success or help, 2 for invalid input, and 1 for an operational failure.
Variant 30. Aquarium
1. Initial level. Create a Kotlin/JVM program: set in code dimensions a,b,c 1–300 cm; print volume a*b*c/1000 liters; ignore glass and equipment. Print fractional results with two decimal places and integers without a fractional part. Submit a Gradle project and a manual reference calculation.
2. Basic level. Create a Kotlin/JVM program: read from the keyboard dimensions a,b,c 1–300 cm; print volume a*b*c/1000 liters; ignore glass and equipment. Print fractional results with two decimal places and integers without a fractional part. Document the valid input format in the README, check two cases, and make three local Git commits.
3. Advanced level. Create a Kotlin/JVM program: read from command-line arguments dimensions a,b,c 1–300 cm; print volume a*b*c/1000 liters; ignore glass and equipment. Print fractional results with two decimal places and integers without a fractional part. Check argument count, conversion, finiteness, and bounds; explain invalid input without printing a total. Submit a Gradle project, a README, three commits, and a table of normal, boundary, and invalid input. Add CLI arguments in key=value format and --help; with no arguments, read the same fields from the keyboard. Print a labeled tabular report with a total; send errors to stderr. Exit codes: 0 for success or help, 2 for invalid input, and 1 for an operational failure.
Procedure
- Record Kotlin, Gradle, the build process JVM, and the program JDK.
- Create a Kotlin DSL project and check mainClass and stdin.
- Record the formula, units, valid values, and rounding.
- Implement the program and compare the result with a manual calculation.
- Run it from the IDE, through Gradle, and from the installDist distribution.
- Prepare a README and a local Git repository with three commits.
- Include code, a test table, and a conclusion about limitations in the report.