JavaAlgorithm

프로그래머스 세균 증식(자바)

MyDiaryYo 2023. 11. 27. 17:57

 

 

 

class Solution {
    public int solution(int n, int t) {
        for(int i=1; i<=t; i++){
            n*=2;
        }
        return n;
    }
}