a091: sum of 5 nums
Tags :
Accepted rate : 217人/221人 ( 98% ) [非即時]
評分方式:
Strictly

最近更新 : 2024-12-02 16:39

Content

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

Input

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

each number < 300

Output

an integer

Sample Input #1
1 2 3 4 5
Sample Output #1
15
Sample Input #2
2 8 10 13 54
Sample Output #2
87
測資資訊:
記憶體限制: 64 MB
不公開 測資點#0 (33%): 1.0s , <1K
不公開 測資點#1 (33%): 1.0s , <1K
不公開 測資點#2 (34%): 1.0s , <1K
Hint :

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)

Tags:
出處:
[管理者:
kichan@g.pui... (陳嘉賢CHAN KA IN)
]


ID User Problem Subject Hit Post Date
2658
1753422-4@g.... (P5A30廖善衡 :)
a091
ez 3.141592653587
13 2025-06-23 08:41
2410
1750281-0@g.... (kayden)
a091
ez*2
17 2025-06-04 10:15