반응형
1 2 3 4 5 6 7 8 9 10 11 12 | #include <iostream> using namespace std; int main() { int a,b,c; cin>>a>>b>>c; cout<<(a+b)%c<<endl; cout<<(a%c+b%c)%c<<endl; cout<<(a*b)%c<<endl; cout<<(a%c*b%c)%c<<endl; } | cs |
'Algorithm' 카테고리의 다른 글
백준(baekjoon)(BaekJoon)코딩 1008번:A/B 답 (0) | 2016.09.23 |
---|---|
(C++) - 백준(BOJ) 10869번 : 사칙연산 (0) | 2016.09.23 |
백준(baekjoon)(BaekJoon)코딩 2741번:N찍기 답 (0) | 2016.09.23 |
백준(baekjoon)(BaekJoon)코딩 2742번:기찍N 답 (0) | 2016.09.23 |
백준(baekjoon)(BaekJoon)코딩 2438번:별찍기-1 답 (0) | 2016.09.23 |