ํฐ์คํ ๋ฆฌ ๋ทฐ
๐ฉ๐ป๐ป ๋ฌธ์
โ๐ป ํ์ด
๐จ Go
package main
import (
"fmt"
)
func main() {
burgers := make([]int, 3)
for i := range burgers {
fmt.Scanf("%d", &burgers[i])
}
beverages := make([]int, 2)
for i := range beverages {
fmt.Scanf("%d", &beverages[i])
}
var minBurger, minBeverage = 2000, 2000
for _, burger := range burgers {
if burger < minBurger {
minBurger = burger
}
}
for _, beverage := range beverages {
if beverage < minBeverage {
minBeverage = beverage
}
}
fmt.Println(minBurger + minBeverage - 50)
}
๐จ Python3
import sys
min_burger, min_beverage = 2000, 2000
for i in range(3):
price = int(sys.stdin.readline())
if price < min_burger:
min_burger = price
for i in range(2):
price = int(sys.stdin.readline())
if price < min_beverage:
min_beverage = price
print(min_burger + min_beverage - 50)
728x90
'dev > algorithm' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
BOJ / 2523๋ฒ / ๋ณ ์ฐ๊ธฐ - 13 [Go] [Python3] (0) | 2020.04.06 |
---|---|
BOJ / 10817๋ฒ / ์ธ ์ [Go] [Python3] (0) | 2020.04.05 |
BOJ / 10039๋ฒ / ํ๊ท ์ ์ [Go] [Python3] (0) | 2020.04.03 |
BOJ / 1110๋ฒ / ๋ํ๊ธฐ ์ฌ์ดํด [Go] [Python3] (0) | 2020.04.02 |
BOJ / 10951๋ฒ / A+B - 4 [Go] [Python3] (0) | 2020.04.01 |
๋๊ธ
๊ธ ๋ณด๊ดํจ
์ต๊ทผ์ ๋ฌ๋ฆฐ ๋๊ธ
TAG
- AWS
- Golang
- dp
- ๋ธ๋ฃจํธํฌ์ค
- go
- ๋งฅ๋ถํ๋ก
- ์๋ฐ
- ๋งฅ๋ถ ์ ๊ทธ๋ ์ด๋
- ํ
- BFS
- ์๊ฐ๊ต์ฒด
- Algorithm
- java
- ํ๋ก์ด๋์์ฌ
- python3
- ๋ฐฑ์ค
- BOJ
- ๋ชฝ๊ณ ๋๋น
- ํด์๋งต
- ์ด๋ถํ์
- baekjoon
- dfs
- Macbook pro 2012 mid 13
- MongoDB
- ์คํ
- ์๊ณ ๋ฆฌ์ฆ
- ballet
- ๋งฅ๋ถ
- ๋ถํ ์ ๋ณต
- ๋ฐ๋
- Total
- Today
- Yesterday