2023-11-21 18:06:13 +04:00
|
|
|
|
def main():
|
2023-11-21 21:21:04 +04:00
|
|
|
|
data_path = 'var/data/data.txt'
|
|
|
|
|
result_path = 'var/result/result.txt'
|
|
|
|
|
data = []
|
|
|
|
|
with open(data_path, "r") as data_file:
|
|
|
|
|
data = list(map(lambda x: int(x), data_file.read().split()))
|
|
|
|
|
with open(result_path, 'w') as result:
|
|
|
|
|
result.write(f'{data[0] * data[-1]}')
|
|
|
|
|
print(f'В файл {result_path} было записано {data[0] * data[-1]}')
|
2023-11-21 18:06:13 +04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
|
main()
|