문제 링크입니다: https://www.acmicpc.net/problem/9449
9449번: Garage
The only line contains four integers: W, H, w, h — dimensions of sandlot and garage in meters. You may assume that 1 ≤ w ≤ W ≤ 30 000 and 1 ≤ h ≤ H ≤ 30 000.
www.acmicpc.net
간단한 구현 문제였습니다.
This file contains 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> | |
using namespace std; | |
int main(void) | |
{ | |
ios_base::sync_with_stdio(0); | |
cin.tie(0); | |
int W, H, w, h; | |
cin >> W >> H >> w >> h; | |
int result = ((W / w + 1) / 2) * ((H / h + 1) / 2); | |
cout << result << "\n"; | |
return 0; | |
} |


개발환경:Visual Studio 2017
지적, 조언, 질문 환영입니다! 댓글 남겨주세요~
반응형
'알고리즘 > BOJ' 카테고리의 다른 글
백준 9493번 길면 기차, 기차는 빨라, 빠른 것은 비행기 (0) | 2021.07.20 |
---|---|
백준 9469번 폰 노이만 (0) | 2021.07.19 |
백준 9437번 사라진 페이지 찾기 (0) | 2021.07.17 |
백준 9366번 삼각형 분류 (0) | 2021.07.12 |
백준 9325번 얼마? (0) | 2021.07.11 |