It was with Nintendo's Code Puzzle

http://cp1.nintendo.co.jp/ There is a problem with. Below spoilers

I wrote as follows.

ans.py


#! /usr/bin/env python
def range_check(func):
    return lambda m, e, n, c: ((0 <= m and m < n) and func(m, e, n, c)) or ""
@range_check
def lets_take_tea_bread(m,e,n,c):
    return str(m)

a = 1
while True:
    if int(a)**17%3569==915 :
        print (lets_take_tea_bread(a,17,3569,915))
        break
    a=a+1

Recommended Posts

It was with Nintendo's Code Puzzle
Strengthen with code test ⑦
Strengthen with code test ⑨
Strengthen with code test ③
Strengthen with code test ⑤
Strengthen with code test ④
Strengthen with code test ②
Hamming code with numpy
Strengthen with code test ①
If it was Ruby
Strengthen with code test ⑧
Strengthen with code test ⑨
[IOS] GIF animation with Pythonista3. I was addicted to it.
Get country code with python
Python with VS Code (Windows 10)
Debug Python with VS Code
Document Python code with Doxygen