Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- Algorithm
- or
- WECODE
- len
- list
- js
- 위코드
- Sorted
- DART
- join
- lambda
- iNT
- count
- Python
- If
- enumerate
- sum
- FOR
- STR
- split
- 파이썬
- range
- index
- decorator
- MAX
- LOWER
- map
- SQL
- slice
- and
Archives
- Today
- Total
코드로 우주평화
1130. Square(n) Sum 본문
Square(n) Sum
Solution:
int squareSum(List<int> numbers) {
int result = 0;
for (int i in numbers) {
result += i*i;
}
return result;
}
int squareSum(List<int> n) => n.fold(0, (a, b) => a + b*b);
'나는 이렇게 학습한다 > Algorithm & SQL' 카테고리의 다른 글
1202. Count by X (0) | 2022.12.02 |
---|---|
1201. Is the string uppercase? (0) | 2022.12.01 |
1129. Bin to Decimal (0) | 2022.11.29 |
1128. Hex to Decimal (0) | 2022.11.28 |
1127. Two to One (0) | 2022.11.27 |