问题1489--Forbidden Sum

1489: Forbidden Sum

时间限制: 1 Sec  内存限制: 128 MB
提交: 16  解决: 11
[状态] [讨论版] [提交] [命题人:]
题目描述

Our new calculator is censored and as such it does not accept certain words. You should try to trick by writing a program to calculate the sum of numbers.

Given a list of numbers, you should find the sum of these numbers. Your solution should not contain any of the banned words, even as a part of another word.

The list of banned words are as follows:

  • sum
  • import
  • for
  • while
  • reduce

In short, you can't use loop or any key-words to 'sum'.

This task challenges your creativity to come up with a solution to fit this mission's specs!

The small amount of data. Let's creativity win!

输入

A int number N and N numbers.

输出

The sum of numbers.

样例输入 Copy
3
1 2 3
6
2 2 2 2 2 2
样例输出 Copy
6
12
来源/分类