Masala #KM6LSJCX7J
While #9 (3 ning darajasi minimum)
n natural soni berilgan (n > 1). \(3^k > n\) shartni qanoatlantiruvchi eng kichik butun k sonini faqat qo'shish, ayirish va ko'paytirish amallari yordamida aniqlovchi dastur tuzing. (Fordan foydalanmang whiledan foydalaning. (Bo'lish, butunli bo'lish, qoldiq, daraja, massiv, ildiz, math kutubxonalaridan foydalanish mumkin emas kodda!")
Bitta qatorda n \((1 ≤ n ≤ 10^{18})\) butun soni kiritiladi.
Masala shartida so'ralgan natijani chiqaring.
# | input.txt | output.txt |
---|---|---|
1 |
4 |
2 |
2 |
9 |
3 |