class CalculationResult { // Renamed Result to CalculationResult
public static int simpleArraySum(List ar) {
// Write your code here
// Initialize a variable to store the sum
int sum=0;
for (int num : ar){
sum += num;
}
for (int i=0;i
// sum += ar.get(i);
// }
return sum;
}
}
public class Solution {
public static void main(String[] args) throws IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
BufferedWriter writer = new BufferedWriter(new FileWriter(System.getenv("OUTPUT_PATH")));
int arrayCount = Integer.parseInt(reader.readLine().trim());
List numbers = Stream.of(reader.readLine().replaceAll("\\s+$", "").split(" "))
.map(Integer::parseInt)
.collect(toList());
int sum = CalculationResult.simpleArraySum(numbers);