728x90

๋ฐฐ์—ด 2

[Algorithm] ๊ธฐ๋ณธ ์ž๋ฃŒ๊ตฌ์กฐ์™€ ๋ฐฐ์—ด_2

์ด์ „ ๊ธ€๊ณผ ์ด์–ด์ง€๊ธฐ ๋•Œ๋ฌธ์— ์ด์ „ ๊ธ€์„ ๋จผ์ € ๋ณด์‹œ๋Š” ๊ฒƒ์ด ์ข‹์Šต๋‹ˆ๋‹ค. 2022.11.21 - [Code/Algorithm] - [Algorithm] ๊ธฐ๋ณธ ์ž๋ฃŒ๊ตฌ์กฐ์™€ ๋ฐฐ์—ด [Algorithm] ๊ธฐ๋ณธ ์ž๋ฃŒ๊ตฌ์กฐ์™€ ๋ฐฐ์—ด_1 02 - 1 ์ž๋ฃŒ๊ตฌ์กฐ์™€ ๋ฐฐ์—ด ์‹ค์Šต 2-1 ํ•™์ƒ 5๋ช…์˜ ์‹œํ—˜ ์ ์ˆ˜๋ฅผ ์ž…๋ ฅ๋ฐ›์•„ ํ•ฉ๊ณ„์™€ ํ‰๊ท ์„ ์ถœ๋ ฅํ•˜๊ธฐ # ํ•™์ƒ 5๋ช…์˜ ์‹œํ—˜ ์ ์ˆ˜๋ฅผ ์ž…๋ ฅ๋ฐ›์•„ ํ•ฉ๊ณ„์™€ ํ‰๊ท ์„ ์ถœ๋ ฅํ•˜๊ธฐ print('ํ•™์ƒ ๊ทธ๋ฃน ์ ์ˆ˜์˜ ํ•ฉ๊ณ„์™€ ํ‰๊ท ์„ ๊ตฌํ•ฉ heejins.tistory.com 02 - 1 ๋ฐฐ์—ด์ด๋ž€? ๋ฐฐ์—ด ์›์†Œ์˜ ์ตœ๋Œ“๊ฐ’ ๊ตฌํ•˜๊ธฐ # a์˜ ์›์†Œ๊ฐ€ 3๊ฐœ์ผ ๋•Œ maximum = a[0] if a[1] > maximum: maximum = a[1] if a[2] > maximum: maximum = a[2] # a์˜ ์›์†Œ๊ฐ€ 4๊ฐœ์ผ ๋•Œ m..

Code/Algorithm 2022.11.25

[Algorithm] ๊ธฐ๋ณธ ์ž๋ฃŒ๊ตฌ์กฐ์™€ ๋ฐฐ์—ด_1

02 - 1 ์ž๋ฃŒ๊ตฌ์กฐ์™€ ๋ฐฐ์—ด ์‹ค์Šต 2-1 ํ•™์ƒ 5๋ช…์˜ ์‹œํ—˜ ์ ์ˆ˜๋ฅผ ์ž…๋ ฅ๋ฐ›์•„ ํ•ฉ๊ณ„์™€ ํ‰๊ท ์„ ์ถœ๋ ฅํ•˜๊ธฐ # ํ•™์ƒ 5๋ช…์˜ ์‹œํ—˜ ์ ์ˆ˜๋ฅผ ์ž…๋ ฅ๋ฐ›์•„ ํ•ฉ๊ณ„์™€ ํ‰๊ท ์„ ์ถœ๋ ฅํ•˜๊ธฐ print('ํ•™์ƒ ๊ทธ๋ฃน ์ ์ˆ˜์˜ ํ•ฉ๊ณ„์™€ ํ‰๊ท ์„ ๊ตฌํ•ฉ๋‹ˆ๋‹ค.') score1 = int(input('1๋ฒˆ ํ•™์ƒ์˜ ์ ์ˆ˜๋ฅผ ์ž…๋ ฅํ•˜์„ธ์š”.')) score2 = int(input('2๋ฒˆ ํ•™์ƒ์˜ ์ ์ˆ˜๋ฅผ ์ž…๋ ฅํ•˜์„ธ์š”.')) score3 = int(input('3๋ฒˆ ํ•™์ƒ์˜ ์ ์ˆ˜๋ฅผ ์ž…๋ ฅํ•˜์„ธ์š”.')) score4 = int(input('4๋ฒˆ ํ•™์ƒ์˜ ์ ์ˆ˜๋ฅผ ์ž…๋ ฅํ•˜์„ธ์š”.')) score5 = int(input('5๋ฒˆ ํ•™์ƒ์˜ ์ ์ˆ˜๋ฅผ ์ž…๋ ฅํ•˜์„ธ์š”.')) total = 0 total += score1 total += score2 total += score3 total += scor..

Code/Algorithm 2022.11.21
728x90