When I overslept and participated about 40 minutes late, the judges just stopped, there were a lot of Clars, the D problem went wrong, and it was a terrible time (laugh).
It's usually junior high school mathematics, so it's like pulling the coefficients together and erasing x or y.
a, b, c, d, e, f = map(int, input().split())
y = (c - f * a / d) / (b - e * a / d)
x = c / a - (b / a) * y
print(x, y)
I think it's best to have a bottom of 2, but I can easily think of someone who doesn't, such as A = 9. However, I intuitively think that there aren't many bottoms to consider, so it's appropriate. Try a small number AC.
from math import ceil, log
A = int(input())
result = float('inf')
for i in range(2, 100):
result = min(result, i * ceil(log(A, i)))
print(result)
Unsolvable. Difficulty fraud. Changed from ★ 1.5 to ★ 2.5.
I couldn't solve it. I said that the formula always forms a circle (radius is a positive number), but I wondered if a and b were different and it was an ellipse.
The formula for solving the quadratic equation is junior high school mathematics, so it feels like you just solve it exactly.
a, b, c = map(int, input().split())
t = b * b - 4 * a * c
if t < 0:
print('imaginary')
elif t == 0:
print(-b / (2 * a))
else:
t = t ** 0.5
result = [(-b - t) / (2 * a), (-b + t) / (2 * a)]
result.sort()
print(*result)
Recommended Posts