308669: CF1555A. PizzaForces

Memory Limit:256 MB Time Limit:2 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

PizzaForces

题意翻译

#### 题意 Petya 喜欢去一个名叫 PizzaForces 的披萨店。这个披萨店有 $3$ 种披萨。分别有 $6$ 片的、 $8$ 片的和 $10$ 片的。 做好分别需要 $15,20,25$ 分钟。Petya 今天过生日,共邀请了 $n$ 个朋友来。Petya 想要订一些披萨。数量不能小于 $n$ 个披萨。请问最少需要多久?(需要的时间是所有披萨所需制作时间的总和。) #### 输入 第一行一个整数 $t$ 代表数据组数。$1 \leq t \leq 10^{4}$。 接下来 $t$ 行,每行一个 $n$,代表朋友数。$1 \leq n \leq 10^{16}$。 #### 输出 每行一个整数,代表最少所需制作时间数。

题目描述

PizzaForces is Petya's favorite pizzeria. PizzaForces makes and sells pizzas of three sizes: small pizzas consist of $ 6 $ slices, medium ones consist of $ 8 $ slices, and large pizzas consist of $ 10 $ slices each. Baking them takes $ 15 $ , $ 20 $ and $ 25 $ minutes, respectively. Petya's birthday is today, and $ n $ of his friends will come, so he decided to make an order from his favorite pizzeria. Petya wants to order so much pizza that each of his friends gets at least one slice of pizza. The cooking time of the order is the total baking time of all the pizzas in the order. Your task is to determine the minimum number of minutes that is needed to make pizzas containing at least $ n $ slices in total. For example: - if $ 12 $ friends come to Petya's birthday, he has to order pizzas containing at least $ 12 $ slices in total. He can order two small pizzas, containing exactly $ 12 $ slices, and the time to bake them is $ 30 $ minutes; - if $ 15 $ friends come to Petya's birthday, he has to order pizzas containing at least $ 15 $ slices in total. He can order a small pizza and a large pizza, containing $ 16 $ slices, and the time to bake them is $ 40 $ minutes; - if $ 300 $ friends come to Petya's birthday, he has to order pizzas containing at least $ 300 $ slices in total. He can order $ 15 $ small pizzas, $ 10 $ medium pizzas and $ 13 $ large pizzas, in total they contain $ 15 \cdot 6 + 10 \cdot 8 + 13 \cdot 10 = 300 $ slices, and the total time to bake them is $ 15 \cdot 15 + 10 \cdot 20 + 13 \cdot 25 = 750 $ minutes; - if only one friend comes to Petya's birthday, he can order a small pizza, and the time to bake it is $ 15 $ minutes.

输入输出格式

输入格式


The first line contains a single integer $ t $ ( $ 1 \le t \le 10^4 $ ) — the number of testcases. Each testcase consists of a single line that contains a single integer $ n $ ( $ 1 \le n \le 10^{16} $ ) — the number of Petya's friends.

输出格式


For each testcase, print one integer — the minimum number of minutes that is needed to bake pizzas containing at least $ n $ slices in total.

输入输出样例

输入样例 #1

6
12
15
300
1
9999999999999999
3

输出样例 #1

30
40
750
15
25000000000000000
15

Input

题意翻译

#### 题意 Petya 喜欢去一个名叫 PizzaForces 的披萨店。这个披萨店有 $3$ 种披萨。分别有 $6$ 片的、 $8$ 片的和 $10$ 片的。 做好分别需要 $15,20,25$ 分钟。Petya 今天过生日,共邀请了 $n$ 个朋友来。Petya 想要订一些披萨。数量不能小于 $n$ 个披萨。请问最少需要多久?(需要的时间是所有披萨所需制作时间的总和。) #### 输入 第一行一个整数 $t$ 代表数据组数。$1 \leq t \leq 10^{4}$。 接下来 $t$ 行,每行一个 $n$,代表朋友数。$1 \leq n \leq 10^{16}$。 #### 输出 每行一个整数,代表最少所需制作时间数。

加入题单

算法标签: