a091: Sum of all integer 所有正整數的和
標籤 :
通過比率 : 100% (4 人 / 4 人 ) (非即時)
評分方式 :
Tolerant

最近更新 : 2021-04-12 11:26

內容

Please write a program that can keep read in integers until 0, sum up all integers and print out the result.

請寫一個程式可以不斷地讀取輸入的正整數,直到讀到0 為止,並輸出所有正整數的和。

 

輸入說明

The input consists of several positive integers with the end of 0.

輸入為一連串的正整數,最後一個數字是0。

輸出說明

Sum of all integers

所有正整數的和

範例輸入
1
2
3
4
0
範例輸出
10
測資資訊 :
記憶體限制 : 64 MB
隱藏 測資點#0 (50%): 1.0s , <1K
隱藏 測資點#1 (50%): 1.0s , <1K
提示 :
標籤:
出處:
http://oj.csie.ndhu.edu.tw/problem/PR1090502 [編輯 :
zero_jason (zero_jason(MANAGER))
]


編號 身分 題目 主題 人氣 發表日期
沒有發現任何「解題報告」