"카타 8급 Expressions Matter"의 두 판 사이의 차이

13번째 줄: 13번째 줄:
   if (a * b * c > res) res = a * b * c;
   if (a * b * c > res) res = a * b * c;
   return res;
   return res;
}
</source>
</source>

2019년 2월 5일 (화) 05:13 판

1 개요

카타 8급 C
# 🔗 문제 풀이

틀:카타 8급-46

2 C

int expression_matter(int a, int b, int c) {
  int res = a + b + c;
  if ((a + b) * c > res) res = (a + b) * c;
  if (a * (b + c) > res) res = a * (b + c);
  if (a * b * c > res) res = a * b * c;
  return res;
}
문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}