728x90
SMALL

using System;

public class Solution {
    public int solution(int age) {
        if (age > 120 || age <= 0) 
        {
            throw new Exception("invalid param");
        }
        return 2023-age;
    }
}

 

/////

파이썬

////

def solution(age):
    return 2023-age

 

자바

 

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

설정

트랙백

댓글