Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

16-miniron-v #61

Merged
merged 2 commits into from
Feb 23, 2024
Merged

16-miniron-v #61

merged 2 commits into from
Feb 23, 2024

Conversation

miniron-v
Copy link
Member

@miniron-v miniron-v commented Feb 18, 2024

๐Ÿ”— ๋ฌธ์ œ ๋งํฌ

https://www.acmicpc.net/problem/1081
1081๋ฒˆ: ํ•ฉ
๋ถ„๋ฅ˜: ์ˆ˜ํ•™

โœ”๏ธ ์†Œ์š”๋œ ์‹œ๊ฐ„

2์‹œ๊ฐ„ (์ด๊ฑฐ ํ’€๊ณ  ์„ฑ๋ถˆํ•จ)

โœจ ์ˆ˜๋„ ์ฝ”๋“œ

์šฐ์„  ์‚ฝ์งˆ์˜ ๊ทผ์›์ด์—ˆ๋˜ ๊ฒƒ๋ถ€ํ„ฐ ์ œ๊ฑฐํ•˜๊ณ  ๊ฐ€๊ฒ ๋‹ค.
์ด ๋ฌธ์ œ๋Š” ๋‹ค๋ฅธ ์—ฐ์†ํ•ฉ ๋ฌธ์ œ ์ฒ˜๋Ÿผ, 1๋ถ€ํ„ฐ U๊นŒ์ง€์˜ ์ •๋‹ต - 1๋ถ€ํ„ฐ (L - 1)๊นŒ์ง€์˜ ์ •๋‹ต์œผ๋กœ ๋‹ต์„ ๊ตฌํ•  ์ˆ˜ ์žˆ๋‹ค.

14์™€ 53์„ ๋„ฃ๋Š”๋‹ค๋ฉด, function(1, 53) - function(1, 13)๋กœ ๋‹ต์„ ๊ตฌํ•ด๋‚ผ ์ˆ˜ ์žˆ๋‹ค. ์šฐ๋ฆฐ ์ด ๋ฐฉ์‹์„ ์‚ฌ์šฉํ•  ๊ฒƒ์ด๋‹ค.


์ž๋ฆฟ์ˆ˜์˜ ํŠน์ง•์€ ๋‹ค์Œ๊ณผ ๊ฐ™๋‹ค.

k์˜ ์ž๋ฆฟ์ˆ˜ ํ•ฉ์ด a์ผ ๋•Œ, k + 1์˜ ์ž๋ฆฟ์ˆ˜ ํ•ฉ์€ a + 1์ด๋‹ค. (์˜ˆ์™ธ ์žˆ์Œ)

์˜ˆ์™ธ ์žˆ์Œ์ด ๋ญ” ์†Œ๋ฆฐ๊ฐ€ ์‹ถ๊ฒ ์ง€๋งŒ, ์‰ฝ๊ฒŒ ๋งํ•˜๋ฉด 18์˜ ์ž๋ฆฟ์ˆ˜ ํ•ฉ์ด 9๊ณ , 19์˜ ์ž๋ฆฟ์ˆ˜ ํ•ฉ์€ 9 + 1 = 10์ด๋ผ๋Š” ๊ฒƒ.

์ด๋ฅผ ํ†ตํ•ด ์šฐ๋ฆฐ ๋‹ค์Œ๊ณผ ๊ฐ™์ด ์ถ”๋ก ํ•  ์ˆ˜ ์žˆ๋‹ค.

image

๊ทธ๋ ‡๋‹ค๋ฉด 0๋ถ€ํ„ฐ N๊นŒ์ง€์˜ ํ•ฉ์€ ์–ด๋–ป๊ฒŒ ๊ตฌํ•  ์ˆ˜ ์žˆ์„๊นŒ?
(์™œ 1์ด ์•„๋‹ˆ๋ผ 0์ด๋ผ๋ฉด, ๋‘˜์˜ ๊ฒฐ๊ณผ๋Š” ๊ฐ™๊ธฐ ๋•Œ๋ฌธ์ด๋‹ค.)

image

๋‹จ์ˆœํ•˜๊ฒŒ 1๋ถ€ํ„ฐ N๊นŒ์ง€์˜ ํ•ฉ์ด ๋จ์„ ์•Œ ์ˆ˜ ์žˆ๋‹ค. ๋“ฑ์ฐจ์ˆ˜์—ด์˜ ํ•ฉ ๊ณต์‹(๋˜๋Š” ๊ฐ€์šฐ์Šค ํ•ฉ)์„ ์“ฐ๋ฉด ์ด๋ ‡๊ฒŒ ๋‚˜ํƒ€๋‚ผ ์ˆ˜ ์žˆ๋‹ค.

image

์ž์ฃผ ์ผ๊ณ , ๋˜ ์ต์ˆ™ํ•œ ๊ทธ ๊ณต์‹. ๊ทธ๋Ÿฌ๋‹ˆ ์ด๋ฅผ ๋จผ์ € ๊ตฌํ˜„ํ•ด๋ณด์ž.

long long gaussSum(int k) {

}

(PR ์ž‘์„ฑ ํ›„ ๋ฐœ๊ฒฌํ–ˆ๋Š”๋ฐ, ์œ„์ฒ˜๋Ÿผ int k๋ฅผ ๋งค๊ฐœ๋ณ€์ˆ˜๋กœ ์คฌ๋”๋‹ˆ ์žฅ๋ ฌํ•œ ์—๋Ÿฌ๋ฅผ ์ผ์œผํ‚ค๋ฉฐ ํ‹€๋ ธ์Šต๋‹ˆ๋‹ค๋ฅผ ๋„์› ๋‹ค. ์ด์œ ๋Š” ๋งˆ์ง€๋ง‰์—)

k์˜ ์ตœ๋Œ“๊ฐ’์ด 2,000,000,000(20์–ต)์ด๋ฏ€๋กœ, ๊ณฑ์…ˆ ํ›„ ๋‚˜๋ˆ—์…ˆ์„ ํ•˜๋Š” ๊ฑด ์œ„ํ—˜ ๋ถ€๋‹ด์ด ํฌ๋‹ค. ๊ณฑ์…ˆ ํ›„ ๋ณ€์ˆ˜์˜ ๋ฒ”์œ„๋ฅผ ๋ฒ—์–ด๋‚˜๋ฒ„๋ฆฌ๋ฉด, ์ด์ƒํ•œ ๊ฐ’์ด ๋“ค์–ด๊ฐ€๊ฒŒ ๋˜๋‹ˆ๊นŒ.

๊ทธ๋Ÿฌ๋‹ˆ k๊ฐ€ ์ง์ˆ˜์ธ์ง€, ํ™€์ˆ˜์ธ์ง€์— ๋”ฐ๋ผ ๊ฒฝ์šฐ๋ฅผ ๋‚˜๋ˆ , ๋‹ค์Œ๊ณผ ๊ฐ™์ด ์ฑ„์›Œ์คฌ๋‹ค.

long long gaussSum(long long k) {
	if (k % 2 == 0) {
		return (k / 2) * (k + 1);
	}

	return ((k + 1) / 2) * k;
}

์ž, ๊ทธ๋Ÿผ ๊ฐ€์šฐ์Šค ํ•ฉ์€ ๊ตฌํ–ˆ๊ฒ ๋‹ค. ํ•˜์ง€๋งŒ ์ด๊ฒŒ ์ •๋‹ต์ด๋ฉด ๊ณจ๋“œ ๋ฌธ์ œ์ผ ๋ฆฌ ์—†๋‹ค.
์•ž์„œ ์šฐ๋ฆฐ ์ด๋ ‡๊ฒŒ ์ž๋ฆฟ์ˆ˜ ํ•ฉ์˜ ํ•ฉ์„ ๊ตฌํ•˜๋Š”๋ฐ ์˜ˆ์™ธ๊ฐ€ ์žˆ๋‹ค๊ณ  ํ–ˆ๋‹ค. ๊ทธ๊ฒŒ ๋ฐ”๋กœ ์ด ๋ถ€๋ถ„์ด๋‹ค.

image

์˜ฌ๋ฆผ์ด ๋ฐœ์ƒํ•˜๋ฉด, ์ž๋ฆฟ์ˆ˜์˜ ํ•ฉ์ด 9๋งŒํผ ์ค„์–ด๋“œ๋Š” ๋ถ€๋ถ„.
์™œ 8์ด ์•„๋‹ˆ๊ณ  9๋ƒ๋ฉด, ์šฐ๋ฆฌ๊ฐ€ ์•ž์„œ ์„ธ์› ๋˜ ๋…ผ๋ฆฌ์— ๋”ฐ๋ฅด๋ฉด 20์ž๋ฆฌ์—” 11์ด ๋“ค์–ด๊ฐ”์–ด์•ผ ํ–ˆ๊ธฐ ๋•Œ๋ฌธ์ด๋‹ค.

์ด์ฒ˜๋Ÿผ, ์šฐ๋ฆฌ๊ฐ€ ๊ตฌํ•œ ๋ฐฉ์‹์—์„œ -9๋˜๋Š” ๊ฐ’๋“ค์ด ์žˆ๋‹ค.

image

0๋ถ€ํ„ฐ ํ‘œ๋ฅผ ๊ทธ๋ ธ์„ ๋•Œ, ์šฐ๋ฆฌ๊ฐ€ ๊ตฌํ•œ ๊ฐ’๊ณผ ์‹ค์ œ ๊ฐ’์˜ ์ฐจ์ด๋ฅผ ๋‚˜ํƒ€๋‚ด๋ฉด ์œ„์™€ ๊ฐ™๋‹ค.

16์€ ์˜ฌ๋ฆผ์ด ํ•œ ๋ฒˆ ๋ฐœ์ƒํ–ˆ๊ณ (9 -> 10, 9๋ฅผ ํ•œ ๋ฒˆ ๋นผ์•ผ ํ•˜๊ณ )
27์€ ์˜ฌ๋ฆผ์ด ๋‘ ๋ฒˆ ๋ฐœ์ƒํ–ˆ๋‹ค(9 -> 10, 19 -> 20, 9๋ฅผ ๋‘ ๋ฒˆ ๋นผ์•ผ ํ•œ๋‹ค)

์ด๋Š” ๋˜ํ•œ 100์˜ ์ž๋ฆฌ์—์„œ๋„ ๊ฐ™์€ ํ˜„์ƒ์ด ์ผ์–ด๋‚˜๋Š”๋ฐ, 99 -> 100์œผ๋กœ ๋„˜์–ด๊ฐˆ ๋•Œ ๋˜๋‹ค์‹œ 9๊ฐ€ ์ค„์–ด๋“ ๋‹ค.
์–ผํ• ๋ณด๋ฉด 9๊ฐ€ ๋‘ ๋ฒˆ ์ค„์–ด๋“  ๊ฑฐ ์•„๋ƒ?๋ผ๊ณ  ์ƒ๊ฐํ•  ์ˆ˜ ์žˆ๋‹ค. ํ•˜์ง€๋งŒ, 10์˜ ์ž๋ฆฌ์—์„œ ์ค„์–ด๋“  ๋ถ€๋ถ„์€ ์•ž์„œ ์œ„ ๋ฐฉ์‹์œผ๋กœ ์ด๋ฏธ ๊ณ„์‚ฐํ–ˆ๊ธฐ์—, 100์˜ ์ž๋ฆฌ๊ฐ€ ์ผ์œผํ‚ค๋Š” ๋บ„์…ˆ์€ ํ•œ ๋ฒˆ์ด ๋งž๋‹ค.

์ด๋ฅผ ์ถ”์ƒํ™”ํ•ด ์ˆ˜๋„ ์ฝ”๋“œ๋ฅผ ์ž‘์„ฑํ•ด๋ณด๋ฉด

1๋ถ€ํ„ฐ N๊นŒ์ง€์˜ ์ž๋ฆฟ์ˆ˜ ํ•ฉ์˜ ํ•ฉ์„ ๊ตฌํ•˜๋Š” ๊ณผ์ •
1. answer = gaussSum(N)
2. 10์˜ ์ž๋ฆฌ์— ๋Œ€ํ•ด answer -= 9 * count;
3. 100์˜ ์ž๋ฆฌ์— ๋Œ€ํ•ด answer -= 9 * count;
...
์ž๋ฆฟ์ˆ˜๋ฅผ ๋ชจ๋‘ ๋น„๊ตํ•˜๋ฉด ์ข…๋ฃŒ

๊ฐ€ ๋œ๋‹ค.

์—ฌ๊ธฐ๊นŒ์ง€ ์ฝ”๋“œ๋กœ ์ž‘์„ฑํ•ด๋ณด์ž.

long long gaussSum(long long k) {
	if (k % 2 == 0) {
		return (k / 2) * (k + 1);
	}

	return ((k + 1) / 2) * k;
}

long long getSumOfPlace(long long n) {
	if (n < 1) {
		return 0;
	}

	long long answer = gaussSum(n);

	long long d = 10;
	while ((n / d) > 0) {
		long long q = n / d;
		long long r = n % d;

		answer -= 9 * (gaussSum(q - 1) * d + q * (r + 1));

		d *= 10;
	}

	return answer;
}

d์˜ ์ž๋ฆฌ๋ฅผ ๋น„๊ตํ•  ๋•Œ๋„ ๊ฐ€์šฐ์Šค ํ•ฉ์ด ์“ฐ์˜€๋‹ค. ์™œ๋ƒํ•˜๋ฉด
10์˜ ์ž๋ฆฌ๊ฐ€ 1์ด๋ฉด 1 * 9๋งŒํผ ๋นผ๊ณ 
10์˜ ์ž๋ฆฌ๊ฐ€ 2๋ฉด 2 * 9๋งŒํผ ๋นผ๊ณ 
10์˜ ์ž๋ฆฌ๊ฐ€ 3์ด๋ฉด 3 * 9๋งŒํผ ๋นผ๊ณ 
...
10์˜ ์ž๋ฆฌ๊ฐ€ 33์ด๋ฉด 33 * 9๋งŒํผ ๋นผ๊ณ 
(์—„๋ฐ€ํžˆ ๋งํ•˜๋ฉด 10์˜ ์ž๋ฆฌ๋กœ ํ‘œํ˜„ํ•  ์ˆœ ์—†์ง€๋งŒ, 337์€ ์‹ค์ œ๋กœ 10์˜ ์ž๋ฆฌ ์˜ฌ๋ฆผ์ด 33๋ฒˆ ๋ฐœ์ƒํ•˜๋‹ˆ, ๊ทธ๋Ÿฐ ๋œป์œผ๋กœ ๋ด์ฃผ์‹œ๋ฉด ๊ฐ์‚ฌํ•˜๊ฒ ๋‹ค.)
์ด์ฒ˜๋Ÿผ ๋นผ๋Š” 9์˜ ๊ฐœ์ˆ˜๋„ ๊ฐ€์šฐ์Šค ํ•ฉ์˜ ํ˜•ํƒœ๋ฅผ ๋„๊ธฐ ๋•Œ๋ฌธ์ด๋‹ค.

๊ทธ๋ฆฌ๊ณ  N = 53์ด๋ผ๋ฉด, 50, 51, 52, 53 4๊ฐœ์˜ ์ˆ˜๋งŒ 5๊ฐœ์˜ 9๋ฅผ ๋นผ์•ผ ํ•˜๊ธฐ์—, ์ด๋Š” ๋”ฐ๋กœ q * (r + 1)๋กœ ๊ณ„์‚ฐํ•ด์ฃผ์—ˆ๋‹ค.

์ด์ œ ๋งˆ์ง€๋ง‰์œผ๋กœ, getSumOfPlace(U)์—์„œ getSumOfPlace(L - 1)์„ ๋นผ์ฃผ๋ฉด ๋์ด๋‹ค.

์ด๋•Œ getSumOfPlace(-1)์ด ๋“ค์–ด๊ฐ”์„ ๋•Œ ์—๋Ÿฌ๋ฅผ ์ผ์œผ์ผฐ๊ธฐ์—, getSumOfPlace์˜ ๋‚ด๋ถ€์— ์˜ˆ์™ธ ์ฒ˜๋ฆฌ๊ฐ€ ๋“ค์–ด๊ฐ”๋‹ค.

๐Ÿ“š ์ „์ฒด ์ฝ”๋“œ

#include <iostream>

long long gaussSum(long long k) {
	if (k % 2 == 0) {
		return (k / 2) * (k + 1);
	}

	return ((k + 1) / 2) * k;
}

long long getSumOfPlace(long long n) {
	if (n < 1) {
		return 0;
	}

	long long answer = gaussSum(n);

	long long d = 10;
	while ((n / d) > 0) {
		long long q = n / d;
		long long r = n % d;

		answer -= 9 * (gaussSum(q - 1) * d + q * (r + 1));

		d *= 10;
	}

	return answer;
}

int main() {
	long long l, u;
	std::cin >> l >> u;

	std::cout << getSumOfPlace(u) - getSumOfPlace(l - 1);
}

๐Ÿ“š ์ƒˆ๋กญ๊ฒŒ ์•Œ๊ฒŒ๋œ ๋‚ด์šฉ

๊ฐ€์žฅ ๋งŽ์€ ์‹œ๊ฐ„์„ ์žก์•„๋จน์€ ํ•จ์ˆ˜๋Š” ๋ฐ”๋กœ ์ด ๋ถ€๋ถ„์ด๋‹ค.

long long gaussSum(int k) {
	if (k % 2 == 0) {
		return (k / 2) * (k + 1);
	}

	return ((k + 1) / 2) * k;
}

์ฝ”๋“œ ์ƒ, ๋กœ์ง ์ƒ ์•„๋ฌด ๋ฌธ์ œ๋„ ์—†๋Š”๋ฐ, ๋„๋Œ€์ฒด ์™œ? ๋ผ๊ณ  ์ƒ๊ฐํ–ˆ๊ณ , ๊ทธ๋ ‡๊ธฐ์— ์ด๊ฒŒ ๋ฌธ์ œ์ผ ์ค„ ์ƒ์ƒ๋„ ๋ชป ํ–ˆ์—ˆ๋‹ค.

๊ฒฐ๋ก ๋ถ€ํ„ฐ ๋งํ•˜์ž๋ฉด, ๋งค๊ฐœ ๋ณ€์ˆ˜๊ฐ€ int ํ˜•์ธ ๊ฒŒ ๋งŒ์•…์˜ ๊ทผ์›์ด์—ˆ๋‹ค.

C/C++์—์„œ ์—ฐ์‚ฐ์€, ์ •ํ™•ํ•˜๊ฒ ์•„๋ž˜์˜ ํ”Œ๋กœ์šฐ๋ฅผ ๋”ฐ๋ฅธ๋‹ค.

int k = 2,000,000,000;
long long sum = k / 2 * k;

์ด์™€ ๊ฐ™์€ ์‹์ด ์žˆ๋‹ค๋ฉด
1. k๋ฅผ 2๋กœ ๋‚˜๋ˆˆ๋‹ค. (intํ˜• ์ž„์‹œ ๋ณ€์ˆ˜์— 1,000,000,000์ด ์ž…๋ ฅ๋œ๋‹ค.)
2. ์—ฌ๊ธฐ์— k๋ฅผ ๊ณฑํ•œ๋‹ค. (intํ˜• ์ž„์‹œ ๋ณ€์ˆ˜์— 2,000,000,000,000,000,000์ด ์ž…๋ ฅ๋œ๋‹ค -> overflow!)
2-1. ์ด๋•Œ intํ˜• ๋ฒ”์œ„๋ฅผ ์ดˆ๊ณผํ–ˆ์œผ๋ฏ€๋กœ, ์—ฌ๊ธฐ์—” (๊ฑฐ์˜) ์“ฐ๋ ˆ๊ธฐ ๊ฐ’์ด ๋“ค์–ด๊ฐ„๋‹ค.
4. ์ด๋ฅผ sum์— ์ €์žฅํ•œ๋‹ค.
5. intํ˜•์—์„œ long longํ˜•์œผ๋กœ, ์•”์‹œ์  ํ˜• ๋ณ€ํ™˜์ด ์ผ์–ด๋‚œ๋‹ค.

์œ„ ๊ณผ์ •์— ๋”ฐ๋ผ, ๋ฐ˜ํ™˜๊ฐ’๊ณผ ๋ณ€์ˆ˜๊ฐ€ ์ „๋ถ€ long long์ด๋ผ ํ•ด๋„, k๊ฐ€ intํ˜•์ด๊ธฐ ๋•Œ๋ฌธ์— ์‹ค์ œ๋กœ๋Š” int ๋ฒ”์œ„ ๋‚ด์—์„œ์˜ ์—ฐ์‚ฐ๋งŒ ์ด๋ค„์กŒ๋˜ ๊ฒƒ์ด๋‹ค.

์ด๊ฑธ ์–ด๋””์„œ ๋ฐœ๊ฒฌํ–ˆ๋ƒ๋ฉด... 0 2000000000์˜ ๋‹ต์œผ๋กœ ๋‚œ 18,446,744,073,709,551,615๊ฐ€ ๋‚˜์™”๋Š”๋ฐ, ์งˆ๋ฌธ ๊ฒŒ์‹œํŒ์—์„  82,000,000,002๊ฐ€ ๋‹ต์ด๋ผ๊ณ  ํ•œ ๋ถ€๋ถ„์ด์—ˆ๋‹ค.

์—ฌ๊ธฐ์„œ ๋””๋ฒ„๊น…์œผ๋กœ ์—ญ์ถ”์ ํ•˜๋ฉฐ ๋“ค์–ด๊ฐ€๋ณด๋‹ˆ, ๊ฐ€์šฐ์Šค ํ•จ์ˆ˜๊ฐ€ ๋ฌธ์ œ์ž„์„ ์•Œ ์ˆ˜ ์žˆ์—ˆ๋‹ค.


๋ถˆํ–‰์ธ์ง€ ๋‹คํ–‰์ธ์ง€ ์ฐธ๊ณ ํ•œ ๋ธ”๋กœ๊ทธ๊ฐ€ ์—†๋‹ค. (๊ทธ ๋Œ€์‹  ๋ช‡ ๋ฐฐ๋กœ ๊ณ ํ†ต๋ฐ›์•˜๋‹ค.)

ํฐ ์ˆ˜๋ฅผ ๋‹ค๋ฃฐ ๋•... ๋ณ€์ˆ˜์˜ ์ž๋ฃŒํ˜•, ๋ฐ˜ํ™˜๊ฐ’, ๋งค๊ฐœ ๋ณ€์ˆ˜๊นŒ์ง€ ๊ผผ๊ผผํžˆ ํ™•์ธํ•  ๊ฒƒ
๊ทธ๋ฆฌ๊ณ  ์ˆ˜ํ•™ ๋ฌธ์ œ๋Š” ํ”ผํ•  ๊ฒƒ

๋ฌธ๋นˆ๊ฐ“์˜ ๊ฟ€ํŒ

  1. ๋ฐฑ์ค€์˜ long์€ long long๊ณผ ๊ฐ™๋‹ค.
  2. #define int int64_t๋ฅผ ์„ ์–ธํ•ด๋‘๋ฉด ๊ณ ํ†ต๋ฐ›์ง€ ์•Š๋Š”๋‹ค.

๋‹ค์Œ์— ๊ผญ ์จ๋จน์–ด๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค... ๋ฌธ๋ฉ˜

https://www.acmicpc.net/source/2655996
์ด ์ฝ”๋“œ๋„ ๋ถ„์„ํ•ด๋ณด๊ณ  ์‹ถ์—ˆ๋Š”๋ฐ, ๋„ˆ๋ฌด ์‹ฑ์‹ฑ๋ฏธ์—ญ ์ƒํƒœ๋ผ ๊ธ€์ž๊ฐ€ ๋ˆˆ์— ์•ˆ ๋“ค์–ด์™€์š”... ํ•ด์„ํ•ด์ฃผ์‹ค ๋ถ„ ๊ณ„์‹ ๊ฐ€์š”?

์ „์ฒด ์‚ฌ๊ณ  ๊ณผ์ •: https://autumncat.tistory.com/62

long long answer = gaussSum(n);

long long d = 10;
while ((n / d) > 0) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

n์˜ ์ž๋ฆฟ์ˆ˜๋ฅผ ํ•˜๋‚˜์”ฉ ์ฒ˜๋ฆฌํ•˜๊ธฐ ์œ„ํ•œ while๋ฌธ์ธ๊ฐ€์š”....?!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๋„ค ๋งž์Šต๋‹ˆ๋‹ค. ์ผ๋ฐ˜์ ์œผ๋ก  /= ์—ฐ์‚ฐ๋งŒ ์‹คํ–‰ํ•˜๋ฉฐ n > 0์„ ์กฐ๊ฑด์œผ๋กœ ๊ฑธ์ง€๋งŒ, ์ด๋ฒˆ์—” ์›๋ณธ ๊ฐ’์„ ๋ณด์กดํ•ด์•ผ ํ–ˆ๊ธฐ์— ์ž๋ฆฟ์ˆ˜ ๋ณ€์ˆ˜ d๋ฅผ ๊ธฐ์ค€์œผ๋กœ ํ–ˆ์Šต๋‹ˆ๋‹ค.

@Redish03 Redish03 removed their request for review February 21, 2024 15:29
Copy link
Member

@bomik0221 bomik0221 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์‹ฑ์‹ฑ๋ฏธ์—ญ..๋ง›์žˆ๊ฒ ๋‹ค
๋ฏผ์ฒ ๋‹˜์ด ๊ณ ์ƒํ•˜์‹  ๋งŒํผ ์ €ํ•œํ…Œ๋„ ์ดํ•ดํ•˜๊ธฐ ์‰ฝ์ง€ ์•Š์€ ์ฝ”๋“œ์˜€๋˜ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค. ๊ณ ์ƒํ•˜์…จ์–ด์š”!
๊ฐ€์šฐ์Šค๊นŒ์ง€ ๋ณด๊ณ  ์˜ค~ ๋‚˜๋„ ์ดํ•ดํ•˜๊ธฐ ์‰ฌ์šด๋ฐ~ ํ–ˆ๋‹ค๊ฐ€ ๋ฐ‘์˜ ํ‘œ๋ถ€ํ„ฐ๋Š” ์ €๋„ ์‹ฑ์‹ฑ๋ฏธ์—ญ ์ƒํƒœ๊ฐ€ ๋˜์—ˆ์Šต๋‹ˆ๋‹ค...

@miniron-v
Copy link
Member Author

์‹ฑ์‹ฑ๋ฏธ์—ญ..๋ง›์žˆ๊ฒ ๋‹ค ๋ฏผ์ฒ ๋‹˜์ด ๊ณ ์ƒํ•˜์‹  ๋งŒํผ ์ €ํ•œํ…Œ๋„ ์ดํ•ดํ•˜๊ธฐ ์‰ฝ์ง€ ์•Š์€ ์ฝ”๋“œ์˜€๋˜ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค. ๊ณ ์ƒํ•˜์…จ์–ด์š”! ๊ฐ€์šฐ์Šค๊นŒ์ง€ ๋ณด๊ณ  ์˜ค~ ๋‚˜๋„ ์ดํ•ดํ•˜๊ธฐ ์‰ฌ์šด๋ฐ~ ํ–ˆ๋‹ค๊ฐ€ ๋ฐ‘์˜ ํ‘œ๋ถ€ํ„ฐ๋Š” ์ €๋„ ์‹ฑ์‹ฑ๋ฏธ์—ญ ์ƒํƒœ๊ฐ€ ๋˜์—ˆ์Šต๋‹ˆ๋‹ค...

์šฐ๋ฆฐ ๋ชจ๋‘ ํ๋ฌผ๊ฑฐ๋ฆฌ๋Š” ๋ฏธ์—ญ์ผ ๋ฟ...

@miniron-v miniron-v merged commit e830a84 into main Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants