๐ ์ฝํ
/BOJ
[Swift] ๋ฐฑ์ค 2475
JerryiOS
2023. 3. 22. 13:12
let input = readLine()!.split(separator: " ").map { Int($0)! * Int($0)! }.reduce(0, +)
print(input % 10)
์ซ์๋ค์ ํฉ์ ๋ํ ๋๋ .reduce(0, +)๋ฅผ ์ฐ๋ฉด ํธํ๋ค.
๋ฐ์ํ