From c869d88c285ab471d5375517849a9402489f3378 Mon Sep 17 00:00:00 2001 From: yenru0 Date: Mon, 13 Apr 2026 22:58:31 +0900 Subject: [PATCH] complete 10233.kt --- storage/zeta/kt/completed/10233.kt | 33 ++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 storage/zeta/kt/completed/10233.kt diff --git a/storage/zeta/kt/completed/10233.kt b/storage/zeta/kt/completed/10233.kt new file mode 100644 index 0000000..bfc740a --- /dev/null +++ b/storage/zeta/kt/completed/10233.kt @@ -0,0 +1,33 @@ +import kotlin.math.roundToInt + + +fun main() { + while (true) { + val (x, y, s) = readln().split(' ').map { it.toInt() } + if (x == 0 && y == 0 && s == 0) break + + var let_max_after = 0 + for (i in 1..s / 2) { + // get before tax + // i: price of the first item before tax + // j: price of the second item before tax + val at_x_i = (100 + x) * i + val at_x_j = s * 100 - (at_x_i / 100) * 100 + + val j_min = (at_x_j + (100 + x) - 1) / (100 + x) + + val j_max = (at_x_j + 99) / (100 + x) + + for (j in j_min..j_max) { + val at_y_i = (100 + y) * i + val at_y_j = (100 + y) * j + + val key = at_y_i / 100 + at_y_j / 100 + + let_max_after = maxOf(let_max_after, key) + } + } + + println(let_max_after) + } +} \ No newline at end of file