티스토리 뷰

1
2
3
4
5
6
7
8
9
10
11
if let input = readLine()?.split(separator: " "){
    let a = Int(input[0].description)!
    let b = Int(input[1].description)!
    let c = Int(input[2].description)!
    print((a+b)%c)
    print((a%c + b%c) % c)
    print((a*b)%c)
    print((a%c * b%c) % c)
}
 
 
cs


'Algorithm > Baekjoon Online Judge' 카테고리의 다른 글

10809번 '알파벳 찾기'  (0) 2018.02.23
10718번 'We love kriii'  (0) 2018.02.23
10172번 '개'  (0) 2018.02.23
10039번 '평균 점수'  (0) 2018.02.23
9498번 '시험 성적'  (0) 2018.02.23
댓글
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
TAG
more
«   2025/02   »
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28
글 보관함