class Solution {
public int solution(int n) {
int answer = 0;
int start = 1;
int end = 1;
int sum = 1;
// 시작점, 끝점, 총합을 선언
while(true) {
if(sum<n) {
end++;
sum += end;
// 총합보다 적다면 끝점을 하나 뒤로해서 총합을 늘림
} else if(sum == n) {
answer++;
sum-=start;
start++;
// 총합과 같다면 answer+1을 한 뒤 시작점을 하나 뒤로 늘려 경우를 바꿈
} else if(sum>n) {
sum-=start;
start++;
// 총 합보다 크다면 시작점 하나 뒤로 이동하여 총 합을 줄임
}
if(start > n) break;
// 시작점이 N보다 크다면 반복 종료
}
return answer;
}
}
[7884]Crazywin Official Login | Best Online Slots and GCash Bonuses,Join CrazyWin, the top-rated online casino in the Philippines. Register today to access official login, fast app downloads, and the best casino slots with massive bonuses. Play and win big now! visit: crazywin
[4840]৫৭৭বেট বাংলাদেশ (577bet) – অনলাইন ক্যাসিনো ও বেটিং অফিশিয়াল সাইট,৫৭৭বেট বাংলাদেশ (577bet) অফিশিয়াল সাইটে সেরা অনলাইন ক্যাসিনো ও স্পোর্টস বেটিং-এর অভিজ্ঞতা নিন। নিরাপদ পেমেন্ট এবং আকর্ষণীয় বোনাস পেতে আজই আমাদের সাথে যুক্ত হোন। visit: 577bet
[2563]mxgana Login Oficial | Descarga la APK y Slots en Vivo,mxgana es tu portal de entretenimiento con los mejores slots en vivo. Recarga fácil en casinos con depósitos en Oxxo y descubre cómo jugar ruleta online. ¡Únete ya! visit: mxgana
[2149]বাংলাদেশের সেরা ক্যাসিনো (tap555bet)-অনলাইন ক্রিকেট বেটিং ও লগইন,বাংলাদেশের সেরা ক্যাসিনো tap555bet-এ উপভোগ করুন অনলাইন ক্রিকেট বেটিং ও লাইভ গেমসের রোমাঞ্চ। দ্রুত লগইন করুন এবং নিরাপদ প্ল্যাটফর্মে সেরা সব বোনাস নিয়ে আজই খেলা শুরু করুন! visit: tap555bet
[1288]7000 bet লগইন এবং অ্যাপ ডাউনলোড | বিকাশ ক্যাসিনো ডিপোজিট,7000 bet লগইন করে অনলাইন স্লট গেম নিয়ম জানুন এবং লাইভ ক্যাসিনো বোনাস অফার উপভোগ করুন। এখনই অ্যাপ ডাউনলোড করে গেম শুরু করুন। visit: 7000 bet
[5560]PhilBet: Official Login, Register & Casino Bonus | Download App & Slots,Join PhilBet, the Philippines’ premier online casino. Register today to claim your exclusive casino bonus and enjoy a wide range of slots and betting games. Download the app for a seamless mobile experience and secure login. visit: philbet
https://addlinks.pro/pQpdZ
Xin chao all my gaming buddies here in Vietnam. I have tested quite a few platforms lately and this one really stands out for the simple reason that it actually respects its players. Lightning fast deposits and withdrawals plus a massive library of slots that keep me hooked every single day. Definitely my go to from now on. vnnew88ok1