SWLUG/๋ฐฑ์ค€ BEAKJOON 39

[python/ํŒŒ์ด์ฌ] ๋ฐฑ์ค€ BEAKJOON 2754๋ฒˆ: ํ•™์  ๊ณ„์‚ฐ

[python/ํŒŒ์ด์ฌ] ๋ฐฑ์ค€ BEAKJOON 2754๋ฒˆ: ํ•™์  ๊ณ„์‚ฐ https://www.acmicpc.net/problem/2754 2754๋ฒˆ: ํ•™์ ๊ณ„์‚ฐ ์–ด๋–ค ์‚ฌ๋žŒ์˜ C์–ธ์–ด ์„ฑ์ ์ด ์ฃผ์–ด์กŒ์„ ๋•Œ, ํ‰์ ์€ ๋ช‡ ์ ์ธ์ง€ ์ถœ๋ ฅํ•˜๋Š” ํ”„๋กœ๊ทธ๋žจ์„ ์ž‘์„ฑํ•˜์‹œ์˜ค. A+: 4.3, A0: 4.0, A-: 3.7 B+: 3.3, B0: 3.0, B-: 2.7 C+: 2.3, C0: 2.0, C-: 1.7 D+: 1.3, D0: 1.0, D-: 0.7 F: 0.0 www.acmicpc.net 1. ๋ฌธ์ œ 2. ์ •๋‹ต ๋ฐ ํ’€์ด score = input() if score == "A+": print(4.3) elif score == "A0": print(4.0) elif score == "A-": print(3.7) elif scor..

[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 11382๋ฒˆ: ๊ผฌ๋งˆ ์ •๋ฏผ

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

[python/ํŒŒ์ด์ฌ] ๋ฐฑ์ค€ BEAKJOON 10430๋ฒˆ: ๋‚˜๋จธ์ง€

[python/ํŒŒ์ด์ฌ] ๋ฐฑ์ค€ BEAKJOON 10430๋ฒˆ: ๋‚˜๋จธ์ง€ https://www.acmicpc.net/problem/10430 10430๋ฒˆ: ๋‚˜๋จธ์ง€ ์ฒซ์งธ ์ค„์— A, B, C๊ฐ€ ์ˆœ์„œ๋Œ€๋กœ ์ฃผ์–ด์ง„๋‹ค. (2 ≤ A, B, C ≤ 10000) www.acmicpc.net 1. ๋ฌธ์ œ 2. ์ •๋‹ต ๋ฐ ํ’€์ด

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

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