XJTU_Python/homework/2/3.py

8 lines
255 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

x1,y1 = map(float,input().split())
x2,y2 = map(float,input().split())
a = complex(round(x1+x2,1),round(y1+y2,1))
b = complex(round(x1-x2,1),round(y1-y2,1))
print(a)
print(b)
# 这个代码暂时有 bug整数的时候不会补 0但是暂时够用了