ํŒŒ์ด์ฌ 10

[python/ํŒŒ์ด์ฌ] ๋ฐฑ์ค€ BEAKJOON 10869๋ฒˆ: ์‚ฌ์น™ ์—ฐ์‚ฐ

[python/ํŒŒ์ด์ฌ] ๋ฐฑ์ค€ BEAKJOON 10869๋ฒˆ: ์‚ฌ์น™ ์—ฐ์‚ฐ https://www.acmicpc.net/problem/10869 10869๋ฒˆ: ์‚ฌ์น™์—ฐ์‚ฐ ๋‘ ์ž์—ฐ์ˆ˜ A์™€ B๊ฐ€ ์ฃผ์–ด์ง„๋‹ค. ์ด๋•Œ, A+B, A-B, A*B, A/B(๋ชซ), A%B(๋‚˜๋จธ์ง€)๋ฅผ ์ถœ๋ ฅํ•˜๋Š” ํ”„๋กœ๊ทธ๋žจ์„ ์ž‘์„ฑํ•˜์‹œ์˜ค. www.acmicpc.net 1. ๋ฌธ์ œ 2. ์ •๋‹ต ๋ฐ ํ’€์ด %d๋ฅผ &๋กœ ๋ฐ›์•„์ฃผ๋Š” ๊ฑธ๋กœ ์ฐฉ๊ฐํ•˜๊ณ  ๊ณ„์† ํ—ค๋ฉจ์Šต๋‹ˆ๋‹ค!

[python/ํŒŒ์ด์ฌ] ๋ฐฑ์ค€ BEAKJOON 1463๋ฒˆ: 1๋กœ ๋งŒ๋“ค๊ธฐ

[python/ํŒŒ์ด์ฌ] ๋ฐฑ์ค€ BEAKJOON 1463๋ฒˆ: 1๋กœ ๋งŒ๋“ค๊ธฐ https://www.acmicpc.net/problem/1463 1463๋ฒˆ: 1๋กœ ๋งŒ๋“ค๊ธฐ ์ฒซ์งธ ์ค„์— 1๋ณด๋‹ค ํฌ๊ฑฐ๋‚˜ ๊ฐ™๊ณ , 106๋ณด๋‹ค ์ž‘๊ฑฐ๋‚˜ ๊ฐ™์€ ์ •์ˆ˜ N์ด ์ฃผ์–ด์ง„๋‹ค. www.acmicpc.net 1. ๋ฌธ์ œ 2. ์ •๋‹ต ๋ฐ ํ’€์ด appendํ•จ์ˆ˜, ๋‹ค์ด๋‚˜๋ฏน ํ•จ์ˆ˜๋ฅผ ์ดํ•ดํ•˜์ง€ ๋ชปํ•ด์„œ ๋”ฐ๋กœ ๊ณต๋ถ€ํ•˜๋„๋ก ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค.

[python/ํŒŒ์ด์ฌ] ๋ฐฑ์ค€ BEAKJOON 2562๋ฒˆ: ์ตœ๋Œ“๊ฐ’

[python/ํŒŒ์ด์ฌ] ๋ฐฑ์ค€ BEAKJOON 2562๋ฒˆ: ์ตœ๋Œ“๊ฐ’ 1. ๋ฌธ์ œ 2. ์ •๋‹ต append ํ•จ์ˆ˜์— ๋Œ€ํ•ด์„œ๋Š” ๋” ๊ณต๋ถ€๋ฅผ ํ•ด์•ผํ•  ๊ฒƒ ๊ฐ™๋‹ค. max์— ๋Œ€ํ•ด ์ฒ˜์Œ ์•Œ๊ฒŒ ๋˜์—ˆ๋‹ค.

[python/ํŒŒ์ด์ฌ] ๋ฐฑ์ค€ BEAKJOON 11557๋ฒˆ: Yangjojang of The Year

[python/ํŒŒ์ด์ฌ] ๋ฐฑ์ค€ BEAKJOON 11557๋ฒˆ: Yangjojang of The Year https://www.acmicpc.net/problem/11557 11557๋ฒˆ: Yangjojang of The Year ์ž…ํ•™ OT๋•Œ ๋ˆ„๊ตฌ๋ณด๋‹ค๋„ ๋‚จ๋‹ค๋ฅด๊ฒŒ ๋†€์•˜๋˜ ๋‹น์‹ ์€ ์ž์—ฐ์Šค๋Ÿฝ๊ฒŒ 1ํ•™๋…„ ๊ณผ๋Œ€๋ฅผ ์—ญ์ž„ํ•˜๊ฒŒ ๋˜์—ˆ๋‹ค. ํƒ€๊ต์™€์˜ ์กฐ์ธํŠธ ์— ํ‹ฐ๋ฅผ ๊ธฐํšํ•˜๋ ค๋Š” ๋‹น์‹ ์€ ๊ทผ์ฒ˜์— ์žˆ๋Š” ํ•™๊ต ์ค‘ ์–ด๋Š ํ•™๊ต๊ฐ€ ์ˆ ์„ ๊ฐ€์žฅ ๋งŽ์ด ๋จน๋Š”์ง€ www.acmicpc.net 1. ๋ฌธ์ œ 2. ์ •๋‹ต top_consume_amount = int(0) top_consume_university = "" t = int(input()) for a in range(t): n = int(input()) for b in range(n): university, ..

[python/ํŒŒ์ด์ฌ] ๋ฐฑ์ค€ BEAKJOON 4101๋ฒˆ: ํฌ๋ƒ?

[python/ํŒŒ์ด์ฌ] ๋ฐฑ์ค€ BEAKJOON 4101๋ฒˆ: ํฌ๋ƒ? https://www.acmicpc.net/problem/4101 4101๋ฒˆ: ํฌ๋ƒ? ์ž…๋ ฅ์€ ์—ฌ๋Ÿฌ ๊ฐœ์˜ ํ…Œ์ŠคํŠธ ์ผ€์ด์Šค๋กœ ์ด๋ฃจ์–ด์ ธ ์žˆ๋‹ค. ๊ฐ ํ…Œ์ŠคํŠธ ์ผ€์ด์Šค๋Š” ํ•œ ์ค„๋กœ ์ด๋ฃจ์–ด์ ธ ์žˆ์œผ๋ฉฐ, ๋‘ ์ •์ˆ˜๊ฐ€ ์ฃผ์–ด์ง„๋‹ค. ๋‘ ์ˆ˜๋Š” ๋ฐฑ๋งŒ๋ณด๋‹ค ์ž‘๊ฑฐ๋‚˜ ๊ฐ™์€ ์–‘์˜ ์ •์ˆ˜์ด๋‹ค. ์ž…๋ ฅ์˜ ๋งˆ์ง€๋ง‰ ์ค„์—๋Š” 0์ด www.acmicpc.net 1. ๋ฌธ์ œ 2. ์ •๋‹ต ๋ฐ ํ’€์ด ํ‹€๋ฆฐ ๋ถ€๋ถ„: line 1: ์ž…๋ ฅ์ด ๋ฐ˜๋ณต๋˜์–ด์•ผ ํ•˜๋ฏ€๋กœ while True ์ดํ›„์— ๋“ค์–ด๊ฐ€์•ผ ํ•œ๋‹ค. line 5: a==0, b==0๋กœ ๋ฐ”๊ฟ”์ฃผ๊ธฐ line 5: , ๊ฐ€ ์•„๋‹Œ and๋ฅผ ์‚ฌ์šฉํ•œ๋‹ค. line 8: else์ดํ›„์—๋Š” ์กฐ๊ฑด์„ ์“ฐ์ง€ ์•Š์•„๋„ ๋œ๋‹ค. ๊ทธ๋ƒฅ else: ๋กœ ์ ๊ธฐ ๋งž์•˜์Šต๋‹ˆ๋‹ค ^.^!!

[python/ํŒŒ์ด์ฌ] ๋ฐฑ์ค€ BEAKJOON 5337๋ฒˆ: ์›ฐ์ปด

[python/ํŒŒ์ด์ฌ] ๋ฐฑ์ค€ BEAKJOON 5337๋ฒˆ: ์›ฐ์ปด https://www.acmicpc.net/problem/5337 5337๋ฒˆ: ์›ฐ์ปด Welcome์„ ์˜ˆ์ œ ์ถœ๋ ฅ์ฒ˜๋Ÿผ ์ถœ๋ ฅํ•˜๋Š” ํ”„๋กœ๊ทธ๋žจ์„ ์ž‘์„ฑํ•˜์‹œ์˜ค. www.acmicpc.net 1. ๋ฌธ์ œ Welcome์„ ์˜ˆ์ œ ์ถœ๋ ฅ์ฒ˜๋Ÿผ ์ถœ๋ ฅํ•˜๋Š” ํ”„๋กœ๊ทธ๋žจ์„ ์ž‘์„ฑํ•˜๋Š” ๋ฌธ์ œ์ด๋‹ค. 2. ์ •๋‹ต ๋ฐ ํ’€์ด ์ด ๋ฌธ์ œ์—์„œ์˜ ํฌ์ธํŠธ๋Š” ํŒŒ์ด์ฌ์œผ๋กœ ์ถœ๋ ฅ ํ”„๋กœ๊ทธ๋žจ์„ ๋งŒ๋“ค ๋•Œ ๊ฐ ์ค„๋งˆ๋‹ค print("")๋ฅผ ํ•ด์ค˜์•ผ ํ•œ๋‹ค๋Š” ์  ๊ฐ™์Šต๋‹ˆ๋‹ค.

[python/ํŒŒ์ด์ฌ] ๋ฐฑ์ค€ BEAKJOON 2525๋ฒˆ: ์˜ค๋ธ ์‹œ๊ณ„

[python/ํŒŒ์ด์ฌ] ๋ฐฑ์ค€ BEAKJOON 2525๋ฒˆ: ์˜ค๋ธ ์‹œ๊ณ„ https://www.acmicpc.net/problem/2525 2525๋ฒˆ: ์˜ค๋ธ ์‹œ๊ณ„ ์ฒซ์งธ ์ค„์— ์ข…๋ฃŒ๋˜๋Š” ์‹œ๊ฐ์˜ ์‹œ์™€ ๋ถ„์„ ๊ณต๋ฐฑ์„ ์‚ฌ์ด์— ๋‘๊ณ  ์ถœ๋ ฅํ•œ๋‹ค. (๋‹จ, ์‹œ๋Š” 0๋ถ€ํ„ฐ 23๊นŒ์ง€์˜ ์ •์ˆ˜, ๋ถ„์€ 0๋ถ€ํ„ฐ 59๊นŒ์ง€์˜ ์ •์ˆ˜์ด๋‹ค. ๋””์ง€ํ„ธ ์‹œ๊ณ„๋Š” 23์‹œ 59๋ถ„์—์„œ 1๋ถ„์ด ์ง€๋‚˜๋ฉด 0์‹œ 0๋ถ„์ด ๋œ๋‹ค.) www.acmicpc.net 1. ๋ฌธ์ œ 2. ์ •๋‹ต ๋ฐ ํ’€์ด ์ธํ„ฐ๋„ท์— ๋‚˜์™€ ์žˆ๋Š” ๋‹ค๋ฅธ ๋ถ„์ด ์˜ฌ๋ฆฐ ์ฝ”๋“œ๋ฅผ ์ฐธ๊ณ ํ•˜์˜€์Šต๋‹ˆ๋‹ค... 3. ๋Š๋‚€ ์  Q. (m+t)%60 ๋ง๊ณ  (m+t)-60์„ ์“ฐ๋ฉด ์•ˆ ๋˜๋‚˜? >> m+t>120 ์ธ ๊ฒฝ์šฐ๋„ ์žˆ๊ธฐ ๋•Œ๋ฌธ์— ์•ˆ ๋ฉ๋‹ˆ๋‹ค!

[python/ํŒŒ์ด์ฌ] ๋ฐฑ์ค€ BEAKJOON 2163๋ฒˆ: ์ดˆ์ฝœ๋ฆฟ ์ž๋ฅด๊ธฐ

[python/ํŒŒ์ด์ฌ] ๋ฐฑ์ค€ BEAKJOON 2163๋ฒˆ: ์ดˆ์ฝœ๋ฆฟ ์ž๋ฅด๊ธฐ https://www.acmicpc.net/problem/2163 2163๋ฒˆ: ์ดˆ์ฝœ๋ฆฟ ์ž๋ฅด๊ธฐ ์ •ํ™”๋Š” N×M ํฌ๊ธฐ์˜ ์ดˆ์ฝœ๋ฆฟ์„ ํ•˜๋‚˜ ๊ฐ€์ง€๊ณ  ์žˆ๋‹ค. ์ดˆ์ฝœ๋ฆฟ์€ ๊ธˆ์ด ๊ฐ€ ์žˆ๋Š” ๋ชจ์–‘์„ ํ•˜๊ณ  ์žˆ์œผ๋ฉฐ, ๊ทธ ๊ธˆ์— ์˜ํ•ด N×M๊ฐœ์˜ ์กฐ๊ฐ์œผ๋กœ ๋‚˜๋ˆ ์งˆ ์ˆ˜ ์žˆ๋‹ค. ์ดˆ์ฝœ๋ฆฟ์˜ ํฌ๊ธฐ๊ฐ€ ๋„ˆ๋ฌด ํฌ๋‹ค๊ณ  ์ƒ๊ฐํ•œ ๊ทธ๋…€๋Š” ์ดˆ์ฝœ๋ฆฟ www.acmicpc.net 1. ๋ฌธ์ œ 2. ์ •๋‹ต ๋ฐ ํ’€์ด NxM ํฌ๊ธฐ์˜ ์ดˆ์ฝœ๋ฆฟ ์ „์ฒด๋ฅผ 1x1 ์กฐ๊ฐ์œผ๋กœ ๋‚˜๋ˆ ์ฃผ๋ ค๋ฉด ๋ช‡ ๋ฒˆ์„ ์ž˜๋ผ์•ผ ํ• ๊นŒ? 1x5 ํฌ๊ธฐ์˜ ์ดˆ์ฝœ๋ฆฟ์€ 4๋ฒˆ 2x5 ํฌ๊ธฐ์˜ ์ดˆ์ฝœ๋ฆฟ์€ 9๋ฒˆ 4x6 ํฌ๊ธฐ์˜ ์ดˆ์ฝœ๋ฆฟ์€ 23๋ฒˆ ์™œ ์ด๋Ÿฐ ๊ทœ์น™์ด ๋‚˜์˜ฌ๊นŒ! ๊ณผ์ •์„ ํ’€์–ด์„œ ์ •๋ฆฌํ•ด๋ณด์•˜์Šต๋‹ˆ๋‹ค. ์ด๋Ÿฐ ๊ทœ์น™ ๋”ฐ๋ผ์„œ NxM ํฌ๊ธฐ์˜ ์ดˆ์ฝœ๋ฆฟ์€ (N*M-1)๋ฒˆ ์ž˜๋ผ์ฃผ๋ฉด ๋ฉ..

[python/ํŒŒ์ด์ฌ] ๋ฐฑ์ค€ BEAKJOON 1330๋ฒˆ: ๋‘ ์ˆ˜ ๋น„๊ตํ•˜๊ธฐ

[python/ํŒŒ์ด์ฌ] ๋ฐฑ์ค€ BEAKJOON 1330๋ฒˆ: ๋‘ ์ˆ˜ ๋น„๊ตํ•˜๊ธฐ ๋Ÿฐํƒ€์ž„ ์—๋Ÿฌ๊ฐ€ ๋œจ๋Š”๋ฐ ์–ด๋–ค ๋ถ€๋ถ„์ด ์ž˜๋ชป๋˜์—ˆ๋Š”์ง€ ๋ชจ๋ฅด๊ฒ ์Šต๋‹ˆ๋‹ค...