문제
15596 정수 N개의 합
답
kotlin code
import java.util.Arrays;
public class Test {
public long sum(int[] a) {
return Arrays.stream(a).mapToLong(num -> (long)num).sum();
}
}
import java.util.Arrays;
public class Test {
public long sum(int[] a) {
return Arrays.stream(a).mapToLong(num -> (long)num).sum();
}
}