天天看點

Codeforces 1080A Petya and Origami

#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <cstdio>
#include <math.h>
#include <string>
#include <algorithm>

using namespace std;

int n, k;
int ans;

int main() {
	scanf("%d %d", &n, &k);
	int red = 2 * n;
	int green = 5 * n;
	int blue = 8 * n;
	if (red%k == 0) {
		ans += (red / k);
	}
	else {
		ans += ((red / k) + 1);
	}
	if (green%k == 0) {
		ans += (green / k);
	}
	else {
		ans += ((green / k) + 1);
	}
	if (blue%k == 0) {
		ans += (blue / k);
	}
	else {
		ans += ((blue / k) + 1);
	}
	printf("%d\n", ans);
	return 0;
}
           
ACM