From 3ebe85fdcf0259927364719030f4f4dde241d5e4 Mon Sep 17 00:00:00 2001 From: zinnnn37 Date: Sat, 8 Nov 2025 16:35:58 +0900 Subject: [PATCH] =?UTF-8?q?[20251108]=20PGM=20/=20LV2=20/=20=EC=B9=B4?= =?UTF-8?q?=ED=8E=AB=20/=20=EA=B9=80=EB=AF=BC=EC=A7=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../8 PGM LV2 \354\271\264\355\216\253.md" | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 "zinnnn37/202511/8 PGM LV2 \354\271\264\355\216\253.md" diff --git "a/zinnnn37/202511/8 PGM LV2 \354\271\264\355\216\253.md" "b/zinnnn37/202511/8 PGM LV2 \354\271\264\355\216\253.md" new file mode 100644 index 00000000..a983db87 --- /dev/null +++ "b/zinnnn37/202511/8 PGM LV2 \354\271\264\355\216\253.md" @@ -0,0 +1,16 @@ +```java +public class PGM_LV2_카펫 { + + public int[] solution(int B, int Y) { + int mul = B + Y; + int sum = (B + 4) / 2; + + int sqrt = (int) Math.sqrt(sum * sum - 4 * (B + Y)); + + int a = (sum + sqrt) / 2; + int b = (sum - sqrt) / 2; + + return new int[] { a, b }; + } +} +``` \ No newline at end of file