Created
October 16, 2018 14:49
-
-
Save jayden-lee/0186f79202c4c2957c85593e0409d6a1 to your computer and use it in GitHub Desktop.
백준알고리즘 2163번: 초콜릿 자르기
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
/** | |
* 초콜릿 자르기 문제<br> | |
* 알고리즘 분류 : DP | |
* | |
* @author gglee | |
*/ | |
public class Main { | |
public static void main(String[] args) { | |
Scanner scanner = new Scanner(System.in); | |
int N = scanner.nextInt(); | |
int M = scanner.nextInt(); | |
int size = N * M; | |
System.out.println(size - 1); | |
scanner.close(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment