문제 링크입니다: www.acmicpc.net/problem/15726
15726번: 이칙연산
첫째 줄에 세 개 정수 A, B, C(1 <= A, B, C <= 1,000,000)가 주어진다. 답은 int범위를 벗어나지 않는다.
www.acmicpc.net
간단한 구현 문제였습니다.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <algorithm> | |
using namespace std; | |
int main(void) | |
{ | |
ios_base::sync_with_stdio(0); | |
cin.tie(0); | |
double A, B, C; | |
cin >> A >> B >> C; | |
double result = max(A / B * C, A * B / C); | |
cout << (int)result << "\n"; | |
return 0; | |
} |


개발환경:Visual Studio 2017
지적, 조언, 질문 환영입니다! 댓글 남겨주세요~
반응형
'알고리즘 > BOJ' 카테고리의 다른 글
백준 15921번 수찬은 마린보이야!! (0) | 2021.03.22 |
---|---|
백준 15873번 공백 없는 A+B (0) | 2021.03.22 |
백준 15700번 타일 채우기 4 (0) | 2021.03.22 |
백준 15680번 연세대학교 (0) | 2021.03.22 |
백준 15610번 Abbey Courtyard (0) | 2021.03.22 |