java

[프로그래머스 - 자바] 종이 자르기

tues 2023. 9. 6. 08:10

 

솔루션

class Solution {
    public int solution(int M, int N) {
        return ((M-1) + ((N-1)*M));
    }
}