промежутое

This commit is contained in:
2025-12-05 11:48:13 +05:00
parent 30647281a5
commit dcb80ef973
48 changed files with 1190 additions and 0 deletions

35
programm9.py Normal file
View File

@@ -0,0 +1,35 @@
f = open('INPUT.TXT')
a, b, c = map(int, f.readline().split())
f.close()
result = ""
if a == 0 and b == 0 and c == 0:
result = "0"
else:
if a != 0:
result += str(a)
if b != 0:
if b > 0 and result:
result += "+"
if b == 1:
result += "x"
elif b == -1:
result += "-x"
else:
result += str(b) + "x"
if c != 0:
if c > 0 and result:
result += "+"
if c == 1:
result += "y"
elif c == -1:
result += "-y"
else:
result += str(c) + "y"
f = open('OUTPUT.TXT', 'w')
f.write(result)
f.close()