Problem 1. Milk Pails - Bronze

fin = open('pails.in', 'r')

buck1, buck2, buck3 = map(int, fin.readline().split())

ans = 0

# x and y below take care of all 
# possible combinations of the two buckets.

for x in range(1001):
	if (buck1 * x) > buck3:
		break
	for y in range(1001):
		current = (buck1 * x) + (buck2 * y)
		if current > buck3:
			break
		ans = max(ans, current)

with open('pails.out', 'w') as fout:
	fout.write(str(ans) + '\n')
---------------------------------------------------------------------------
FileNotFoundError                         Traceback (most recent call last)
/Users/sony/iwazaki-1/_notebooks/2022-10-18-USA-Computing.ipynb Cell 4 in <cell line: 1>()
----> <a href='vscode-notebook-cell:/Users/sony/iwazaki-1/_notebooks/2022-10-18-USA-Computing.ipynb#X10sZmlsZQ%3D%3D?line=0'>1</a> fin = open('pails.in', 'r')
      <a href='vscode-notebook-cell:/Users/sony/iwazaki-1/_notebooks/2022-10-18-USA-Computing.ipynb#X10sZmlsZQ%3D%3D?line=2'>3</a> buck1, buck2, buck3 = map(int, fin.readline().split())
      <a href='vscode-notebook-cell:/Users/sony/iwazaki-1/_notebooks/2022-10-18-USA-Computing.ipynb#X10sZmlsZQ%3D%3D?line=4'>5</a> ans = 0

FileNotFoundError: [Errno 2] No such file or directory: 'pails.in'

Diamond Collector