백준/23971/ZOAC 4/C

https://www.acmicpc.net/problem/23971

23971호: 조악 4호

i행 j열의 좌석이 (i,j)일 때 한 참가자가 (1,1)에 착석하면 다른 참가자는 (1,2), (2,1), ( 2,2) 좌석. can sit on (2,2)의 경우 (1,1)과 행 및 열 번호의 차이가 1보다 큽니다.

www.acmicpc.net


1) 다

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#pragma warning(disable:4996)

float h, w, n, m;

int main(void) {
	scanf("%f %f %f %f", &h, &w, &n, &m);
	float a = ceil( h / (n + 1));
	float b = ceil(w / (m + 1));
	
	printf("%.0f", ceil(a) * ceil(b));

	return 0;
}