#P92. sum of N nums

sum of N nums

題目描述

Given N integer numbers, please print the sum of those numbers as the result

輸入格式

a list or numpy array "nums" containing N int number

each number < 999999

輸出格式

an integer

Samples

["2 8 10 13 54 2 8 10 13 54 2 8 10 13 54","1 2 3 4 5 6 8 8 9 1 1 -5 -111 -9999"]
["261","-10067"]

提示

Can use a simple "loop" to sum each element or use "sum"function from numpy(you need to "convert" the python list to numpy array first)

原始資料

  • Zero1 題號:a092
  • Hydro 題號:Z0092
  • Locale:zh_TW
  • Display:open