mirror of
https://framagit.org/framasoft/framaspace/argos.git
synced 2025-04-28 18:02:41 +02:00
12 lines
310 B
Python
Executable file
12 lines
310 B
Python
Executable file
import re
|
|
import sys
|
|
|
|
|
|
def fix_output(matchobj):
|
|
return f"{matchobj.group(1)}{float(matchobj.group(2)) * 10}/{int(matchobj.group(3)) * 10}"
|
|
|
|
|
|
pattern = re.compile(r"(Your code has been rated at )([0-9.]+)/(10)")
|
|
for line in sys.stdin:
|
|
line.rstrip()
|
|
print(re.sub(pattern, fix_output, line), end="")
|