Google-Developer-Student-Club-CCOEW / Competitive-Programming-2023-GDSC-CUMMINS-X-GDSC-MMCOE

Welcome to the Hacktoberfest 2023 Competitive-Programming Cohort for Cummins College and MMCOE students! To request issue assignment, create a pull request, providing: 1. Full Name 🧑‍🎓 2.Email 📧 3.College ID (RNO) 🔢 4.Branch of Study.📚 5. Year 📆 .The Cummins College and MMCOE students' PRs will be considered only. Thank you!
9 stars 69 forks source link

Book Shop #149

Closed suryaprakashpandey closed 8 months ago

suryaprakashpandey commented 9 months ago

Write code in the preferred language and attach output with it.

You are in a book shop which sells n different books. You know the price and number of pages of each book.

You have decided that the total price of your purchases will be at most x. What is the maximum number of pages you can buy? You can buy each book at most once.

Input The first input line contains two integers n and x: the number of books and the maximum total price.

The next line contains n integers h1,h2,…,hn: the price of each book.

The last line contains n integers s1,s2,…,sn: the number of pages of each book.

Output Print one integer: the maximum number of pages.

Example:

Input: 4 10 4 8 5 3 5 12 8 1 Output: 13

Explanation: You can buy books 1 and 3. Their price is 4+5=9 and the number of pages is 5+8=13.

Daksha0403 commented 8 months ago

Can u please Assign me this issue Name-Daksha Kulkarni C number-UCE2021437 [daksha.kulkarni@cumminscollege.in] [dakshakulkarni04@gmail.com] (github) TY Comp Cummins college of engineering pune

vaishnavim141003 commented 8 months ago

I would like to work on this issue using python language -Vaishnavi Mahajan. Cummins college of engineering.(SY) Can you please assign this issue to me .

Pankaj4152 commented 8 months ago

Can you assign this to me?