Solve three easy problems to Easy Prey award.
This commit is contained in:
27
python/e836.py
Normal file
27
python/e836.py
Normal file
@@ -0,0 +1,27 @@
|
||||
import re
|
||||
|
||||
|
||||
TEXT = """
|
||||
<p>Let $A$ be an <b>affine plane</b> over a <b>radically integral local field</b> $F$ with residual characteristic $p$.</p>
|
||||
|
||||
<p>We consider an <b>open oriented line section</b> $U$ of $A$ with normalized Haar measure $m$.</p>
|
||||
|
||||
<p>Define $f(m, p)$ as the maximal possible discriminant of the <b>jacobian</b> associated to the <b>orthogonal kernel embedding</b> of $U$ <span style="white-space:nowrap;">into $A$.</span></p>
|
||||
|
||||
<p>Find $f(20230401, 57)$. Give as your answer the concatenation of the first letters of each bolded word.</p>
|
||||
"""
|
||||
|
||||
|
||||
def euler_836():
|
||||
r = ''
|
||||
for m in re.findall(r'<b>(.*?)</b>', TEXT):
|
||||
words = m.split(' ')
|
||||
for word in words:
|
||||
r += word[0]
|
||||
return r
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
solution = euler_836()
|
||||
print("e836.py: " + str(solution))
|
||||
assert(solution == 'aprilfoolsjoke')
|
||||
Reference in New Issue
Block a user