๋ฐ˜์‘ํ˜•

๐Ÿ“ฆ Chango/๐Ÿก Contest 2

[์ฝ”๋ฎค๋‹ˆํ‹ฐ] ์ถ”์„๋งž์ด ์ฝ”๋”ฉ์ฑŒ๋ฆฐ์ง€ 1์ผ์ฐจ : ํ”ผ๋ณด๋‚˜์น˜์ˆ˜

https://cafe.naver.com/codeuniv/44826 [์ถ”์„๋งž์ด ์ฝ”๋”ฉ์ฑŒ๋ฆฐ์ง€โ‘ ] ํ”ผ๋ณด๋‚˜์น˜์ˆ˜ ์ฒซ ๋ฒˆ์งธ ๋ฌธ์ œ์— ๋„์ „ํ•˜๋Ÿฌ ์˜ค์‹  ๋ชจ๋“  ๋ถ„๋“ค ํ™˜์˜ํ•ฉ๋‹ˆ๋‹ค๐Ÿ™Œ ์ถ”์„์—๋„ ์ฝ”๋”ฉํ•˜๋Š” ์—ด์ •๋งจ...๐Ÿฅบ ์ฝ”๋ฎค๊ฐ€ ํ•ญ์ƒ ์‘์›ํ•ฉ๋‹ˆ๋‹ค! ์ฒซ ๋ฒˆ์งธ ๋ฌธ์ œ๋Š” ๋ฐ”๋กœ๋ฐ”๋กœ "ํ”ผ๋ณด๋‚˜์น˜์ˆ˜"์ž…๋‹ˆ๋‹ค~! ์ˆ˜ํ•™๊ณต... cafe.naver.com ์ˆซ์ž n์„ ์ž…๋ ฅ๋ฐ›์•„ ํ”ผ๋ณด๋‚˜์น˜ ์ˆ˜์—ด์˜ n๋ฒˆ์งธ ์ˆซ์ž๋ฅผ ์ถœ๋ ฅํ•˜๋Š” ํ”„๋กœ๊ทธ๋žจ์„ ์ž‘์„ฑํ•ด๋ณด์„ธ์š”. #include int main () { int n, ans=0; scanf("%d", &n); if(n==1) ans = 0; else if(n==2) ans = 1; else { int pp=0; int p=1; for(int i=0; i

[์ฝ”๋ฎค๋‹ˆํ‹ฐ] ์ถ”์„๋งž์ด ์ฝ”๋”ฉ์ฑŒ๋ฆฐ์ง€ 2์ผ์ฐจ : ์ •์ƒ ์ •๋ณต

https://cafe.naver.com/codeuniv/44894 [์ถ”์„๋งž์ด ์ฝ”๋”ฉ์ฑŒ๋ฆฐ์ง€โ‘ก] ์ •์ƒ ์ •๋ณต ์ฒซ ๋ฒˆ์งธ ๋ฌธ์ œ๋Š” ์ž˜ ํ’€์–ด๋ณด์…จ๋‚˜์š”? ํ•˜๋ฃจ์— ํ•˜๋‚˜์”ฉ ์ฐจ๊ทผ์ฐจ๊ทผ ๋„์ „ํ•ด๋ด์š”๐Ÿ˜€ ์•„์ง Lv.1 ๋ฌธ์ œ๋ฅผ ํ’€์ง€ ๋ชปํ•ด๋„ ๊ดœ์ฐฎ์•„์š”! Lv.2๋„ ๋„์ „ํ•ด๋ด…์‹œ๋‹ค๐Ÿ”ฅ ๋‘ ๋ฒˆ์งธ ๋ฌธ์ œ๋Š” "์ •์ƒ ์ •๋ณต"... cafe.naver.com ๋‹ฌํŒฝ์ด๋Š” ๋†’์ด๊ฐ€ N์ธ ๋‚˜๋ฌด๋ฅผ ์˜ฌ๋ผ๊ฐ€๊ณ ์ž ํ•œ๋‹ค. ๋‹ฌํŒฝ์ด๋Š” ๋‚ฎ์—๋Š” A๋ฏธํ„ฐ๋ฅผ ์˜ฌ๋ผ๊ฐˆ ์ˆ˜ ์žˆ์ง€๋งŒ, ๋ฐค์— ํœด์‹์„ ์ทจํ•˜๋ฉด์„œ B๋ฏธํ„ฐ ๋ฏธ๋„๋Ÿฌ์ ธ ๋‚ด๋ ค์˜จ๋‹ค. โ€‹ ๋‹ฌํŒฝ์ด๊ฐ€ ๋‚˜๋ฌด ์ •์ƒ์— ๋„๋‹ฌํ•˜๊ธฐ ์œ„ํ•ด์„  ๋ฉฐ์น ์ด ๊ฑธ๋ฆด๊นŒ์š”? #include int main () { int a, b, n, ans=0; scanf("%d %d %d", &a, &b ,&n); if(a 0){ ans++; n -= a; if(n

๋ฐ˜์‘ํ˜•