Potato
์•ˆ๋…•ํ•˜์„ธ์š”, ๊ฐ์žก๋‹ˆ๋‹ค?๐Ÿฅ” ^___^ ๐Ÿ˜บ github ๋ฐ”๋กœ๊ฐ€๊ธฐ ๐Ÿ‘‰๐Ÿป

Algorithm/Baekjoon

[๋ฐฑ์ค€] (Swift) 2743๋ฒˆ - ๋‹จ์–ด ๊ธธ์ด ์ œ๊ธฐ

๊ฐ์ž ๐Ÿฅ” 2022. 2. 16. 15:37
๋ฐ˜์‘ํ˜•

๋ฌธ์ œ ๋งํฌ

https://www.acmicpc.net/problem/2743

 

2743๋ฒˆ: ๋‹จ์–ด ๊ธธ์ด ์žฌ๊ธฐ

์•ŒํŒŒ๋ฒณ์œผ๋กœ๋งŒ ์ด๋ฃจ์–ด์ง„ ๋‹จ์–ด๋ฅผ ์ž…๋ ฅ๋ฐ›์•„, ๊ทธ ๊ธธ์ด๋ฅผ ์ถœ๋ ฅํ•˜๋Š” ํ”„๋กœ๊ทธ๋žจ์„ ์ž‘์„ฑํ•˜์‹œ์˜ค.

www.acmicpc.net

 

 

๋‚ด๊ฐ€ ํ‘ผ ํ’€์ด

ํ’€์ด๋ผ๊ณ  ํ•˜๊ธฐ๋„ ๋ฏผ๋งํ•˜๋‹ค.. ํฌ์ŠคํŒ…ํ• ๊นŒ๋ง๊นŒ ๊ณ ๋ฏผํ–ˆ๋˜ ๋ฏผ๋งํ•œ ๋ฌธ์ œ ^///^ ๊ทธ๋ž˜๋„ 1์ผ1๋ฐฑ์ค€์˜ ํ•œ ๋ฌธ์ œ๋‹ˆ๊นŒ.. ใ…Žใ…Ž

let line = readLine()!
print(line.count)
๋ฐ˜์‘ํ˜•