From cd293054dc18efc194765fa55ab07d557e2e1903 Mon Sep 17 00:00:00 2001 From: lkhyun <102892446+lkhyun@users.noreply.github.com> Date: Wed, 10 Dec 2025 20:25:28 +0900 Subject: [PATCH] =?UTF-8?q?[20251210]=20PGM=20/=20Lv2=20/=20=EC=88=AB?= =?UTF-8?q?=EC=9E=90=EC=9D=98=20=ED=91=9C=ED=98=84=20/=20=EC=9D=B4?= =?UTF-8?q?=EA=B0=95=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...0\354\235\230 \355\221\234\355\230\204.md" | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 "lkhyun/202512/10 PGM Lv2 \354\210\253\354\236\220\354\235\230 \355\221\234\355\230\204.md" diff --git "a/lkhyun/202512/10 PGM Lv2 \354\210\253\354\236\220\354\235\230 \355\221\234\355\230\204.md" "b/lkhyun/202512/10 PGM Lv2 \354\210\253\354\236\220\354\235\230 \355\221\234\355\230\204.md" new file mode 100644 index 00000000..937641e5 --- /dev/null +++ "b/lkhyun/202512/10 PGM Lv2 \354\210\253\354\236\220\354\235\230 \355\221\234\355\230\204.md" @@ -0,0 +1,20 @@ +```java +class Solution { + public int solution(int n) { + int answer = 0; + int start = 0, end = 0; + int sum = 0; + while(end <= n){ + if(sum == n){ + answer++; + sum += ++end; + }else if(sum < n){ + sum += ++end; + }else{ + sum -= ++start; + } + } + return answer; + } +} +```