2025 National Youth Information Literacy Competition C++ Preliminary Questions for Middle School Group

2025 National Youth Information Literacy Competition C++ Preliminary Questions for Middle School Group

Question 1: Procurement of Adventure Equipment

01

Programming Problem

Procurement of Adventure Equipment

Problem Description:

There are n members in the expedition team, each requiring 3 flashlights, 1 oxygen tank, and 4 bundles of safety rope. The unit price of a flashlight is x yuan, the unit price of an oxygen tank is y yuan, and the unit price of safety rope is z yuan. Write a program to calculate the total cost of purchasing the adventure equipment.

Input Description:

A single line of input contains four integers n, x, y, z, representing the number of expedition team members, the unit price of the flashlight, the unit price of the oxygen tank, and the unit price of the safety rope, separated by spaces.

Output Description:

A single integer representing the total cost of purchasing the equipment.

Sample Input:

40 3 5 4

Sample Output:

1200

Sample Explanation:

40 x (3 x 3 + 1 x 5 + 4 x 4) = 1200

02

Reference Answer

2025 National Youth Information Literacy Competition C++ Preliminary Questions for Middle School Group2025 National Youth Information Literacy Competition C++ Preliminary Questions for Middle School Group

For those applying for programming competitions

Please add your teacher

2025 National Youth Information Literacy Competition C++ Preliminary Questions for Middle School Group

Leave a Comment