본문 바로가기
코딩테스트/프로그래머스 Lv.0

[코테/0레벨] 세균 증식

by moca7 2025. 2. 3.

 

 

 

 

 

ㅁ 내 풀이

 

class Solution {
    public int solution(int n, int t) {

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