```{.python}
# ax + by + c = 0
# dx + ey + f = 0
from fractions import Fraction as frac
eq1 = list(map(int, input("첫번째 연립방정식의 계수>> ").split()))
eq2 = list(map(int, input("두번째 연립방정식의 계수>> ").split()))
a = eq1[0]
b = eq1[1]
c = eq1[2]
d = eq2[0]
e = eq2[1]
f = eq2[2]
if a/d == b/e and b/e != c/f:
print("해가 없음")
elif a/d == b/e == c/f:
print("x, y는 모든 실수")
else:
g_eq1 = list(map(lambda k: k*d, eq1))
g_eq2 = list(map(lambda k: k*a, eq2))
pminus = []
for i in range(0,3):
pminus.append(g_eq1[i] - g_eq2[i])
y = frac(-(pminus[2]), pminus[1])
x = frac(-(b*y)-c, a)
print("x = {0}, y = {1}".format(x, y))
```
초보라 간단한 문제도 오래 걸리네요 열심히 해보겠습니당
```{.python}
# ax + by + c = 0
# dx + ey + f = 0
from fractions import Fraction as frac
eq1 = list(map(int, input("첫번째 연립방정식의 계수>> ").split()))
eq2 = list(map(int, input("두번째 연립방정식의 계수>> ").split()))
a = eq1[0]
b = eq1[1]
c = eq1[2]
d = eq2[0]
e = eq2[1]
f = eq2[2]
if a/d == b/e and b/e != c/f:
print("해가 없음")
elif a/d == b/e == c/f:
print("x, y는 모든 실수")
else:
g_eq1 = list(map(lambda k: k*d, eq1))
g_eq2 = list(map(lambda k: k*a, eq2))
pminus = []
for i in range(0,3):
pminus.append(g_eq1[i] - g_eq2[i])
y = frac(-(pminus[2]), pminus[1])
x = frac(-(b*y)-c, a)
print("x = {0}, y = {1}".format(x, y))
```
초보라 간단한 문제도 오래 걸리네요 열심히 해보겠습니당