diff --git a/code_study/Baekjoon/java/_1932.java b/code_study/Baekjoon/java/_1932.java new file mode 100644 index 0000000..007f7db --- /dev/null +++ b/code_study/Baekjoon/java/_1932.java @@ -0,0 +1,20 @@ +import java.util.*; + +public class _1932 { + public static void main(String[] args) { + Scanner sc = new Scanner(System.in); + int n = Integer.parseInt(sc.nextLine()); + int[][] nums = new int[n][]; + for(int i=0; i=0; i--) { + for(int j=0; j<=i; j++) { + nums[i][j] += Math.max(nums[i+1][j],nums[i+1][j+1]); + } + } + System.out.println(nums[0][0]); + } +} diff --git a/code_study/Baekjoon/swift/1932.swift b/code_study/Baekjoon/swift/1932.swift new file mode 100644 index 0000000..0625bb4 --- /dev/null +++ b/code_study/Baekjoon/swift/1932.swift @@ -0,0 +1,20 @@ +if let n = Int(readLine() ?? "0"){ + var nums:[[Int]] = Array(repeating: Array(repeating: 0 , count: n), count: n) + for i in 0..