1
2
3
4
5
6
7
8
9
public class Test {
    long sum(int[] a) {
        long ans = 0;
        for(int i = 0; i < a.length; i++){
            ans += a[i];
        }
        return ans;
    }
}
http://colorscripter.com/info#e" target="_blank" style="color:#e5e5e5text-decoration:none">Colored by Color Scripter
 

 

간단한 더하기 알고리즘

'알고리즘' 카테고리의 다른 글

백준 6단계(1065)  (0) 2019.12.07
백준 6단계(4673)  (0) 2019.12.07
백준 5단계(4344)  (0) 2019.11.28
백준 5단계(8958)  (0) 2019.11.28
백준 5단계(1546)  (0) 2019.11.28

+ Recent posts