
10808번: 알파벳 개수 단어에 포함되어 있는 a의 개수, b의 개수, …, z의 개수를 공백으로 구분해서 출력한다. www.acmicpc.net 문제 요약 문자열(S)의 각 문자 개수를 출력 풀이 문자의 아스키코드를 인덱스 값으로 이용해 카운팅 한다. import Foundation let input = readLine()! var result: [Int] = Array(repeating: 0, count: 26) for char in input { result[Int(char.asciiValue! - 97)] += 1 } print(result.map{ String($0) }.joined(separator: " "))
Algorithm/백준
2022. 8. 5. 00:56
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- github
- Stack
- BOJ 17298
- swift
- BOJ 10820
- BOJ 10799
- BOJ 10808
- Sheet Height
- 요시푸스
- autolayout
- Card CollectionVIew
- Carousel Effect
- BOJ 10866
- sheetPresentationController
- BOJ 10809
- Algorithm
- bottom sheet
- crud
- 1406 에디터
- ios
- UICollectionView banner
- git
- Gradient View
- Custom Detent
- CAGradientLayer
- BOJ 1935
- UICollectionView Error
- 2023 회고
- NaverMaps
- BOJ 17413
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함