# Codeforces 1080A - Petya and Origami

## 题解链接

https://lucien.ink

## 题目链接

https://codeforces.com/contest/1080/problem/A

## 题目

Petya is having a party soon, and he has decided to invite his n n friends.

He wants to make invitations in the form of origami. For each invitation, he needs two red sheets, five green sheets, and eight blue sheets. The store sells an infinite number of notebooks of each color, but each notebook consists of only one color with k k sheets. That is, each notebook contains k k sheets of either red, green, or blue.

Find the minimum number of notebooks that Petya needs to buy to invite all n n of his friends.

## 题意

2 2 张红纸 + 5 5 张绿纸 + 8 8 张蓝纸 = 1 1 一个人，每一份彩纸中包含 k k 张彩纸，且只有一种颜色的彩纸。现在有 n n 个人，问最少需要买多少份彩纸。

## 思路

模拟一下即可，复杂度 O ( 1 ) O(1)

## 实现

https://pasteme.cn/2336

#include <bits/stdc++.h>
typedef long long ll;
int main() {
ll n, k;
scanf("%lld%lld\n", &n, &k);
printf("%lld\n", (n * 2 + k - 1) / k + (n * 5 + k - 1) / k + (n * 8 + k - 1) / k);
return 0;
}


03-22 830
12-09 310
11-25 52
11-25 76