Golden Pyramid
Elementary+
FR HU Japanese RU UK ZH-HANS EN

タプルのタプルを考えてみましょう。最初のタプルは一つの整数を持ち、次のタプルに行くと整数が一つ増えます。 ...

タプルのタプル形式のピラミッド。各々のタプルは整数値から成ります。

```count_gold((
(1,),
(2, 3),
(3, 3, 1),
(3, 1, 5, 4),
(3, 1, 3, 1, 3),
(2, 2, 2, 2, 2, 2),
(5, 6, 4, 5, 6, 4, 3)
)) == 23
count_gold((
(1,),
(2, 1),
(1, 2, 1),
(1, 2, 1, 1),
(1, 2, 1, 1, 1),
(1, 2, 1, 1, 1, 1),
(1, 2, 1, 1, 1, 1, 9)
)) == 15
count_gold((
(9,),
(2, 2),
(3, 3, 3),
(4, 4, 4, 4)
)) == 18
```

これは動的プログラミングの例に使われる古典的な問題です。 多くの最適化問題に応用できる基本的なコンセプトです。

0 < len(pyramid) ≤ 20
all(all(0 < x < 10 for x in row) for row in pyramid)

You should be an authorized user in order to see the full description and start solving this mission.
Settings
Code:
CheckiO Extensions

CheckiO Extensions allow you to use local files to solve missions. More info in a blog post.

In order to install CheckiO client you'll need installed Python (version at least 3.8)

Install CheckiO Client first:

`pip3 install checkio_client`

`checkio --domain=py config --key=`

Sync solutions into your local folder

`checkio sync`

(in beta testing) Launch local server so your browser can use it and sync solution between local file end extension on the fly. (doesn't work for safari)

`checkio serv -d`

Alternatevly, you can install Chrome extension or FF addon

`checkio install-plugin`
`checkio install-plugin --ff`
`checkio install-plugin --chromium`

Read more here about other functionality that the checkio client provides. Feel free to submit an issue in case of any difficulties.

Sync...