https://www.acmicpc.net/problem/2292제출 코드#include using namespace std;int getRoom(int a){ if (a == 1) return 1; return (6 * (a - 1)) + getRoom(a - 1);}int main(){ ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); int n; cin >> n; for(int i = 1; i 맨 처음에는 재귀함수를 이용해 매 시도마다 수를 계산했는데풀어놓고 보니 굳이 저렇게 풀지 않고도 매번 건너온 방의 개수에 6을 곱해준 수를 더 해서 비교하는 식으로 풀어도 됐다#include using namespace ..