favicon Jay Lee DevLog

728x90
300x250
#include <string>
#include <vector>
#include <cmath> // pow 써도됨..

using namespace std;

int solution(int n, int t) {
    int answer = n;
    for(int i=0; i<t; i++)
        answer = answer * 2;
    
    return answer;
}

이 문제도 그냥 *2씩하면 되는거라..

딱히 뭐 없었다.

 

쉽게 하신 분들은 쉬프트 사용해서 했다.

딱히 설명할 게 없다..

728x90
반응형

+ Recent posts

/ /

Contact

📧 dlwjdwls60@naver.com


블로그에 내용이 있으면 해당 글을 보여주며, 없으면 내용이 복사된 채로 ChatGPT로 연결됩니다.