Latest web development tutorials

Pythonは演習81、

Pythonの100リー Pythonの100リー

タイトル:809 * 800 * ?? = ??二桁+ 9 + 1 * ?? ??二桁の8 * ??結果、9 * ??は3桁の結果を表しています。 ??代表は二桁を求め、その結果809の後に* ??。

プログラム解析:なし。

ソースコード:

#!/usr/bin/python
# -*- coding: UTF-8 -*-

a = 809
for i in range(10,100):
    b = i * a + 1
    if b >= 1000 and b <= 10000 and 8 * i < 100 and 9 * i >= 100:
        print b,'/',i,' = 809 * ',i,' + ', b % i

上の例の出力は、次のとおりです。

9709 / 12  = 809 *  12  +  1

Pythonの100リー Pythonの100リー