跳到主要内容
图灵 OJTURING / ONLINE JUDGE

#F2902. A Piece of Cake

    ID: 2908 传统题 2000ms 256MiB 尝试: 0 已通过: 0 难度: 6 上传者: 标签>模拟编程与模拟提高难度共享题库Codeforces英文题面题目来源题面语言

A Piece of Cake

题目描述

C. A Piece of Cake
time limit per test
2 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

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.
  2. Take carrots from refrigerator.
  3. Chop carrots.
  4. Take chocolate spread from refrigerator.
  5. Put chocolate spread into the mixing bowl.
  6. Combine pack of flour into the mixing bowl.
  7. Fold chocolate spread into the mixing bowl.
  8. Add chocolate spread into the mixing bowl.
  9. Put pack of flour into the mixing bowl.
  10. Add egg into the mixing bowl.
  11. Fold pack of flour into the mixing bowl.
  12. Chop carrots until choped.
  13. Pour contents of the mixing bowl into the baking dish.

Serves 1.

Input

The only line of input contains a sequence of integers a0,a1,... (1≤a0≤100, 0≤ai≤1000 for i≥1).

Output

Output a single integer.

Examples
Input
4 1 2 3 4
Output
30

题目来源:fps-www.educg.net-codeforce-1-2833.xml.zip;FPS 共享题包,题包内第 2573 题。保留原作者与原赛事署名。