We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0cffed4 commit d7b6f82Copy full SHA for d7b6f82
1 file changed
0224LJH/202512/06 PGM 숫자의 표현.md
@@ -0,0 +1,29 @@
1
+```java
2
+import java.io.*;
3
+import java.util.*;
4
+
5
+class Solution {
6
+ public int solution(int n) {
7
+ int start = 1;
8
+ int end = 1;
9
+ int curSum = 1;
10
11
+ int answer = 0;
12
13
+ while (end <= n){
14
+ if (curSum == n){
15
+ answer++;
16
+ end++;
17
+ curSum += end;
18
+ }else if (curSum < n){
19
20
21
+ }else{
22
+ curSum -= start;
23
+ start++;
24
+ }
25
26
+ return answer;
27
28
+}
29
+```
0 commit comments