[HUAWEI OD machine test real questions 2023B volume JAVA&JS] birthday gift

Huawei OD2023 (B volume) machine test question bank is fully covered, click here for the guide to brushing the questions

birthday present

Arrangement and combination of knowledge points

Time limit: 1s Space limit: 256MB Limited language: unlimited

Title description:

Maverick's child's birthday is coming soon. He plans to buy a cake and a small gift for the child. He will buy one cake and one small gift. His budget does not exceed x yuan. Cakes and small gifts are available in a variety of price ranges.

Please return how many purchase options Mavericks have.

Enter a description:

The first line indicates the unit price of the cake, separated by commas

The first line indicates the unit price of the gift, separated by commas

The third line represents x budget

Output description:

The output number represents the total number of purchase options

Supplementary note:

1 <= cake.length <= 10^5
1 <= gift.length <= 10^5
1 <= cake[i],gift[i] <= 10^5
1 <= x <= 2*10^5

Example 1

enter:

Guess you like

Origin blog.csdn.net/qq_34465338/article/details/131249816