CF171C A Piece of Cake

题目描述

CF 愚人节题目,题面如下。 How to make a cake you'll never eat. Ingredients. - 2 carrots - 0 calories - 100 g chocolate spread - 1 pack of flour - 1 egg Method. 1. Put calories into the mixing bowl. 1. Take carrots from refrigerator. 1. Chop carrots. 1. Take chocolate spread from refrigerator. 1. Put chocolate spread into the mixing bowl. 1. Combine pack of flour into the mixing bowl. 1. Fold chocolate spread into the mixing bowl. 1. Add chocolate spread into the mixing bowl. 1. Put pack of flour into the mixing bowl. 1. Add egg into the mixing bowl. 1. Fold pack of flour into the mixing bowl. 1. Chop carrots until choped. 1. Pour contents of the mixing bowl into the baking dish. Serves 1.

输入格式

输入一行 $n$ 个数字,$a_0,a_1,\dots,a_n$。

输出格式

输出一个数字。

说明/提示

$1 \le a_0 \le 100,0 \le a_i \le 100(i \ge 1)$。 提示:这道题题面是用一种叫 Chef 的奇怪语言写的,代码很像菜谱,题目意思是输出程序的运行结果。 **形式化题面** 给定 长度为 $a_0 + 1$ 的数组 $a$,求 $\sum_{i=1}^{a_0} a_i \times i$。 Translated by liuli688