SWLUG/๋ฐฑ์ค€ BEAKJOON 39

[C] ๋ฐฑ์ค€ BEAKJOON 2164๋ฒˆ: ์นด๋“œ2

https://www.acmicpc.net/problem/2164 2164๋ฒˆ: ์นด๋“œ2 N์žฅ์˜ ์นด๋“œ๊ฐ€ ์žˆ๋‹ค. ๊ฐ๊ฐ์˜ ์นด๋“œ๋Š” ์ฐจ๋ก€๋กœ 1๋ถ€ํ„ฐ N๊นŒ์ง€์˜ ๋ฒˆํ˜ธ๊ฐ€ ๋ถ™์–ด ์žˆ์œผ๋ฉฐ, 1๋ฒˆ ์นด๋“œ๊ฐ€ ์ œ์ผ ์œ„์—, N๋ฒˆ ์นด๋“œ๊ฐ€ ์ œ์ผ ์•„๋ž˜์ธ ์ƒํƒœ๋กœ ์ˆœ์„œ๋Œ€๋กœ ์นด๋“œ๊ฐ€ ๋†“์—ฌ ์žˆ๋‹ค. ์ด์ œ ๋‹ค์Œ๊ณผ ๊ฐ™์€ ๋™์ž‘์„ ์นด๋“œ๊ฐ€ www.acmicpc.net ์ž˜ ๋ชจ๋ฅด๊ฒ ๋‹ค... ์—ฌ๋Ÿฌ๊ฐ€์ง€ ๋ฐฉ๋ฒ•์„ ์‹œ๋„ํ•ด๋ณด์•˜๋Š”๋ฐ, ์ง„์งœ ํ˜น์‹œ๋‚˜ํ•ด์„œ ์ œ์ถœํ–ˆ๋Š”๋ฐ ์—ญ์‹œ๋‚˜ ํ‹€๋ ธ๋‹ค. ๊ตฌ๊ธ€๋ง์„ ํ†ตํ•ด ์ •๋‹ต์„ ์•Œ์•„๋ณด์•˜๋‹ค. (์ฐธ๊ณ : https://jootopia0808.tistory.com/111, https://blog.naver.com/kim-nan-hee/221901814483 ) [1] ์ •๋‹ต ์ฝ”๋“œ #include #define size 500000 int main() { int n, ..

[C] ๋ฐฑ์ค€ BEAKJOON 10773๋ฒˆ: ์ œ๋กœ

[C] ๋ฐฑ์ค€ BEAKJOON 10773๋ฒˆ: ์ œ๋กœ https://www.acmicpc.net/problem/10773 10773๋ฒˆ: ์ œ๋กœ ์ฒซ ๋ฒˆ์งธ ์ค„์— ์ •์ˆ˜ K๊ฐ€ ์ฃผ์–ด์ง„๋‹ค. (1 ≤ K ≤ 100,000) ์ดํ›„ K๊ฐœ์˜ ์ค„์— ์ •์ˆ˜๊ฐ€ 1๊ฐœ์”ฉ ์ฃผ์–ด์ง„๋‹ค. ์ •์ˆ˜๋Š” 0์—์„œ 1,000,000 ์‚ฌ์ด์˜ ๊ฐ’์„ ๊ฐ€์ง€๋ฉฐ, ์ •์ˆ˜๊ฐ€ "0" ์ผ ๊ฒฝ์šฐ์—๋Š” ๊ฐ€์žฅ ์ตœ๊ทผ์— ์“ด ์ˆ˜๋ฅผ ์ง€์šฐ๊ณ , ์•„๋‹ ๊ฒฝ www.acmicpc.net [1] ๋ฌธ์ œ [2] ์ •๋‹ต ๋ฐ ํ•ด์„ค ์ •๋‹ต ์ฝ”๋“œ #include int cnt = 0; int stack[100000]; void push(int n){ stack[cnt] = n; cnt++; } void pop(){ cnt--; stack[cnt] = 0; } int main() { int inputNumber; i..

[C] ๋ฐฑ์ค€ BEAKJOON 1978๋ฒˆ: ์†Œ์ˆ˜ ์ฐพ๊ธฐ

[C] ๋ฐฑ์ค€ BEAKJOON 1978๋ฒˆ: ์†Œ์ˆ˜ ์ฐพ๊ธฐ https://www.acmicpc.net/problem/1978 1978๋ฒˆ: ์†Œ์ˆ˜ ์ฐพ๊ธฐ ์ฒซ ์ค„์— ์ˆ˜์˜ ๊ฐœ์ˆ˜ N์ด ์ฃผ์–ด์ง„๋‹ค. N์€ 100์ดํ•˜์ด๋‹ค. ๋‹ค์Œ์œผ๋กœ N๊ฐœ์˜ ์ˆ˜๊ฐ€ ์ฃผ์–ด์ง€๋Š”๋ฐ ์ˆ˜๋Š” 1,000 ์ดํ•˜์˜ ์ž์—ฐ์ˆ˜์ด๋‹ค. www.acmicpc.net [1] ๋ฌธ์ œ [2] ์ •๋‹ต ๋ฐ ํ•ด์„ #define _CRT_SECURE_NO_WARNINGS #include int main(void) { int N; int i; int j; int a[100]; int cnt = 0; scanf("%d", &N); for (i = 0; i < N; i++) { scanf("%d", &a[i]); } for (i = 0; i < N; i++) { for (j = 2; j

[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 22966๋ฒˆ: ๊ฐ€์žฅ ์‰ฌ์šด ๋ฌธ์ œ๋ฅผ ์ฐพ๋Š” ๋ฌธ์ œ

[python/ํŒŒ์ด์ฌ] ๋ฐฑ์ค€ BEAKJOON 22966๋ฒˆ: ๊ฐ€์žฅ ์‰ฌ์šด ๋ฌธ์ œ๋ฅผ ์ฐพ๋Š” ๋ฌธ์ œ https://www.acmicpc.net/problem/22966 22966๋ฒˆ: ๊ฐ€์žฅ ์‰ฌ์šด ๋ฌธ์ œ๋ฅผ ์ฐพ๋Š” ๋ฌธ์ œ ์˜ˆ์„  ๋ฌธ์ œ๋ฅผ ์„ฑ์‹คํ•˜๊ฒŒ ๋ณต์Šตํ•œ ํ•™์ƒ๋“ค์ด๋ผ๋ฉด ์˜ˆ์„ ์— ์ถœ์ œ๋œ 5๋ฌธ์ œ๊ฐ€ ๋‚œ์ด๋„ ์ˆœ์„œ๋Œ€๋กœ ์ •๋ ฌ๋˜์–ด ์žˆ๋‹ค๋Š” ๊ฒƒ์„ ์•Œ์•„์ฐจ๋ ธ์„ ๊ฒƒ์ด๋‹ค. ํ•˜์ง€๋งŒ ๋ณธ์„ ์€ ๋ฌธ์ œ ์ œ๋ชฉ์— ๋Œ€ํ•ด ์‚ฌ์ „์ˆœ์œผ๋กœ ์ •๋ ฌํ–ˆ๊ธฐ ๋•Œ๋ฌธ์— ๋‚œ www.acmicpc.net 1) ๋ฌธ์ œ 2) ๋ฌธ์ œ ํ’€์ด/ ์ •๋‹ต ๋ฌธ์ œ ์ž์ฒด๋„ ์ดํ•ดํ•˜๊ธฐ ์–ด๋ ต๊ณ , ์–ด๋–ป๊ฒŒ ํ’€์–ด์•ผ ํ•˜๋Š”์ง€ ๊ฐ์ด ์•ˆ ์™€์„œ ๋‹ค์Œ ๋งํฌ์—์„œ ์†Œ๊ฐœํ•œ ์ฝ”๋“œ๋ฅผ ์‚ฌ์šฉํ–ˆ๋‹ค. [์ถœ์ฒ˜] https://velog.io/@lee_yesol421/%EB%B0%B1%EC%A4%80-22966-%EA%B0%80%EC%9E%A5-%EC%89%AC%..

[python/ํŒŒ์ด์ฌ] ๋ฐฑ์ค€ BEAKJOON 2476๋ฒˆ: ์ฃผ์‚ฌ์œ„ ๊ฒŒ์ž„

[python/ํŒŒ์ด์ฌ] ๋ฐฑ์ค€ BEAKJOON 2476๋ฒˆ: ์ฃผ์‚ฌ์œ„ ๊ฒŒ์ž„ https://www.acmicpc.net/problem/2476 2476๋ฒˆ: ์ฃผ์‚ฌ์œ„ ๊ฒŒ์ž„ ์ฒซ์งธ ์ค„์—๋Š” ์ฐธ์—ฌํ•˜๋Š” ์‚ฌ๋žŒ ์ˆ˜ N์ด ์ฃผ์–ด์ง€๊ณ  ๊ทธ ๋‹ค์Œ ์ค„๋ถ€ํ„ฐ N๊ฐœ์˜ ์ค„์— ์‚ฌ๋žŒ๋“ค์ด ์ฃผ์‚ฌ์œ„๋ฅผ ๋˜์ง„ 3๊ฐœ์˜ ๋ˆˆ์ด ๋นˆ์นธ์„ ์‚ฌ์ด์— ๋‘๊ณ  ๊ฐ๊ฐ ์ฃผ์–ด์ง„๋‹ค. www.acmicpc.net 1) ๋ฌธ์ œ 2) ์‹œํ–‰ ์ฐฉ์˜ค a) 1์ฐจ ์‹œ๋„ n=int(input()) for i in range(1,n+1): a,b,c=map(int, input().split()) if a==b==c: print(int(10000+(a*1000))) elif a==b and a!=c: print(int(1000+(a*100))) elif b==c and b!=a: print(int(100..