# 归档 2017年7月

## LeetCode Weekly Contest 40解题报告 作者是 在线疯狂 发布于 2017年7月9日 在 LeetCode.

LeetCode Weekly Contest 40是LeetCode举办的第四十五场正式周赛，共4道题目，比赛时长1.5小时。

LeetCode 637. Average of Levels in Binary Tree

LeetCode 640. Solve the Equation

LeetCode 638. Shopping Offers

LeetCode 639. Decode Ways II

## 题目描述：

LeetCode 639. Decode Ways II

A message containing letters from `A-Z` is being encoded to numbers using the following mapping way:

```'A' -> 1
'B' -> 2
...
'Z' -> 26
```

Beyond that, now the encoded string can also contain ...

## 题目描述：

LeetCode 638. Shopping Offers

In LeetCode Store, there are some kinds of items to sell. Each item has a price.

However, there are some special offers, and a special offer consists of one or more different kinds of items ...

## 题目描述：

LeetCode 640. Solve the Equation

Solve a given equation and return the value of `x` in the form of string "x=#value". The equation contains only '+', '-' operation, the variable `x` and its coefficient.

If there ...

## 题目描述：

LeetCode 637. Average of Levels in Binary Tree

Given a non-empty binary tree, return the average value of the nodes on each level in the form of an array.

Example 1:

```Input:
3
/ \
9  20
/  \
15   7
Output: [3 ...```