jfz-2023-s464983/TaskE01/run.py

15 lines
362 B
Python
Raw Permalink Normal View History

2024-01-19 20:41:55 +01:00
import re
def check_number(file_path):
with open(file_path, 'r', encoding='utf-8') as file:
pattern = r'^(25|50|75|100|[1-9]\d*(25|50|75|00))$'
for line in file:
if re.match(pattern, line.strip()):
print('yes')
else:
print('no')
file_path = 'TaskE01/test.in'
check_number(file_path)