티스토리 뷰
출처 : https://www.swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV14dUIaAAUCFAYD&
#include <iostream>
#include <algorithm>
#include <memory.h>
using namespace std;
int a, b;
int cal(int now)
{
if (now == 1)return a;
return (a * cal(now - 1));
}
int main()
{
int T; int t;
T = 10;
while (T--)
{
cin >> t;
cin >> a >> b;
cout << "#" << t << " " << cal(b) << endl;
}
return 0;
}
'알고리즘 > SWEA' 카테고리의 다른 글
[SWEA 1219] 길찾기 (0) | 2018.08.10 |
---|---|
[SWEA 1218] 괄호 짝짓기 (0) | 2018.08.10 |
[SWEA 1216] 회문2 (0) | 2018.08.09 |
[SWEA 1215] 회문1 (0) | 2018.08.09 |
[SWEA 1213] String (0) | 2018.08.09 |
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- 17779
- boj
- 2018 카카오 블라인드 채용
- SW Expert Academy
- DFS
- string
- 알고리즘
- scanf
- 17142
- 이차원 배열과 연산
- 게리맨더링 2
- 트렌드
- 17837
- 백준
- 입출력
- 연구소 3
- DP
- 17143
- 팁
- 삼성
- 17140
- hackerrank
- 미세먼지 안녕!
- SWEA
- 역량 테스트
- 새로운 게임 2
- 2018 KAKAO BLIND RECRUITMENT
- STL
- 시간 복잡도
- 17144
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함