Bibi's DevLog ๐ค๐
[๋ฐฑ์ค 2490] ์ท๋์ด ๋ณธ๋ฌธ
https://www.acmicpc.net/problem/2490
0์ด 1๊ฐ = ๋ = A
0์ด 2๊ฐ = ๊ฐ = B
0์ด 3๊ฐ = ๊ฑธ = C
0์ด 4๊ฐ = ์ท = D
0์ด 0๊ฐ = ๋ชจ = E
(1...3).forEach { _ in
let input = readLine()!.split(separator: " ")
let upperCount = input.filter { $0 == "0" }.count
switch upperCount {
case 1:
print("A")
case 2:
print("B")
case 3:
print("C")
case 4:
print("D")
case 0:
print("E")
default:
break
}
}
'ํ๋ก๊ทธ๋๋ฐ > ์๊ณ ๋ฆฌ์ฆ ํ์ด Swift' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[๋ฐฑ์ค 2566] ์ต๋๊ฐ (Swift) (0) | 2022.09.15 |
---|---|
[๋ฐฑ์ค 2562] ์ต๋๊ฐ (Swift) (0) | 2022.09.14 |
[๋ฐฑ์ค 2484] ์ฃผ์ฌ์ ๋ค๊ฐ (Swift) (0) | 2022.09.12 |
[๋ฐฑ์ค 2476] ์ฃผ์ฌ์ ๊ฒ์ (Swift) (0) | 2022.09.09 |
[๋ฐฑ์ค 2309] ์ผ๊ณฑ ๋์์ด (0) | 2022.09.07 |