일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- 방송통신대학교
- Deep learning
- omscs
- zeros
- 마니토바
- 기본
- Plotting
- MATLAB
- C++
- 코딩테스트
- 딥러닝
- leetcode
- 조지아텍
- 방통대
- 컴퓨터과학과
- 매트랩
- 온라인석사
- EOI
- 주정부이민
- LV1
- machine learning
- 알고리즘
- 프로그래머스
- LAA
- 머신러닝
- cpp
- mpnp
- 캐나다 영주권
- 개발자
- 선형대수
Archives
- Today
- Total
Krononberg
1641. Count Sorted Vowel Strings.cpp 본문
재밌는 문제.
class Solution {
public:
int countVowelStrings(int n) {
int a=1,b=1,c=1,d=1,e=1;
for(int i =2; i<=n;i++){
a = a+b+c+d+e;
b = b+c+d+e;
c = c+d+e;
d = d+e;
e = e;
}
return a+b+c+d+e;
}
};
'개발 로그 > 알고리즘' 카테고리의 다른 글
1325. Delete Leaves With a Given Value.cpp (0) | 2021.10.12 |
---|---|
701. Insert into a Binary Search Tree.cpp (0) | 2021.10.08 |
1829. Maximum XOR for Each Query.cpp (0) | 2021.10.08 |
1748. Sum of Unique Elements.cpp (0) | 2021.10.08 |
961. N-Repeated Element in Size 2N Array.cpp (0) | 2021.10.08 |