Jam's story

[프로그래머스] 세균증식 JAVA 본문

코딩테스트/프로그래머스

[프로그래머스] 세균증식 JAVA

애플쩀 2022. 12. 21. 09:39
	 public static int solution(int n, int t) {
	        int answer = 0;
	        if((1<=n && n<=10) && (1<=t && t<=15)) {
	        	answer=n*(int) Math.pow(2,t);
	        } 
	        
	        System.out.println(answer);
	        return answer;
	    }

 

Comments