문제 : https://www.acmicpc.net/problem/2331 문제의 INPUT을 배열해보면 위의 그림과 같은 형식으로 나오게 된다. 다음 숫자(next number)를 구하는 방법은 while (A != 0) { calcul_res += (int)pow(A % 10, P); A /= 10; } 을 이용하면 되고, 백터의 처음 부터 끝까지를 탐색하며, 다음 숫자와 동일한 경우 함수를 끝마친다.그렇지 않을 경우, 백터에 지속적으로 다음 숫자를 추가해준다. #include #include #include using namespace std; int A, P; int calcul_res = 0; int res = 0, position = 0; vector arr; int function() { a..
알고리즘/(깨짐)
2017. 3. 21. 22:24
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- MVVM
- listview
- WPF
- DP
- 타일링
- Cell Animation
- Add TapGesture
- dfs
- 객체
- C++
- 그래프
- Fakebook
- 백준
- BFS
- Grid
- 코딩야학
- 문자열
- Custom Cell
- 데이터 바인딩
- XAML
- command
- 생활코딩
- FEED
- CustomCollectionViewCell
- 백준온라인
- 스택
- UIView Animation
- CollectionView
- BOJ
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함