CF1080A.Petya and Origami

入门

通过率:0%

时间限制:1.00s

内存限制:256MB

AC君温馨提醒

该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。

题目描述

Petya is having a party soon, and he has decided to invite his nn 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 kk sheets. That is, each notebook contains kk sheets of either red, green, or blue.

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

佩特亚很快就要举办一场派对,他决定邀请他的 nn 位朋友。

他打算用折纸的方式制作请柬。每份请柬需要 2 张红色纸、5 张绿色纸和 8 张蓝色纸。商店中每种颜色的笔记本均有无限供应,但每本笔记本只含一种颜色,且每本恰好包含 kk 张纸。也就是说,每本笔记本要么含 kk 张红色纸,要么含 kk 张绿色纸,要么含 kk 张蓝色纸。

求佩特亚为邀请全部 nn 位朋友所需购买的笔记本的最少数量。

输入格式

The first line contains two integers nn and kk (1≤n,k≤1081\leq n, k\leq 10^8) — the number of Petya's friends and the number of sheets in each notebook respectively.

第一行包含两个整数 nn 和 kk(1≤n,k≤1081\leq n, k\leq 10^8)—— 分别表示佩蒂亚的朋友人数以及每本笔记本的页数。

输出格式

Print one number — the minimum number of notebooks that Petya needs to buy.

输出一个数字——Petya 需要购买的笔记本的最少数量。

输入输出样例

  • 输入#1

    3 5

    输出#1

    10
  • 输入#2

    15 6

    输出#2

    38

说明/提示

In the first example, we need 22 red notebooks, 33 green notebooks, and 55 blue notebooks.

In the second example, we need 55 red notebooks, 1313 green notebooks, and 2020 blue notebooks.

在第一个例子中,我们需要 22 本红色笔记本、33 本绿色笔记本和 55 本蓝色笔记本。

在第二个例子中,我们需要 55 本红色笔记本、1313 本绿色笔记本和 2020 本蓝色笔记本。

输入解题思路,AI测评打分。不知道怎么写?

首页