본문 바로가기

Coding Test/프로그래머스

[프로그래머스/자바] 나이 출력

class Solution {
    public int solution(int age) {
        return 2023-age;
    }
}

class Solution {
    public int solution(int age) {
    	int year = 2022;
        return year-age+1;
    }
}