Beta
Jobs
Description:
Story
You work for a software company. You know that you will soon go on vacation, so you need to earn as much money as possible.
Task
You are given the number n - the number of working days before the holiday. You want to get as much money as possible by the nth day. You can make money by doing projects(or jobs). You can do one job a day. You can do every job only once. You are given two lists of equal length - a and b. You know that if you do some work on day j, on day j + ai you get bi money. How much money can you get by n-th day?
You need to implement function jobs(n, a, b) which returns number - answer to the task.
def jobs(n, a, b) -> int:
pass
Constraints
there are 100 random tests where:
1 ≤ n ≤ 10000
1 ≤ a1,2,3,...,k < n
1 ≤ b1,2,3,...,k ≤ 10000
Example
jobs(n=9,
a=[3, 6, 8, 6, 5, 6],
b=[5, 6, 2, 1, 7, 4]) == 24
Good luck :D
Algorithms
Puzzles
Fundamentals
Similar Kata:
Stats:
Created | Oct 13, 2020 |
Published | Oct 13, 2020 |
Warriors Trained | 53 |
Total Skips | 0 |
Total Code Submissions | 97 |
Total Times Completed | 11 |
Python Completions | 11 |
Total Stars | 3 |
% of votes with a positive feedback rating | 50% of 4 |
Total "Very Satisfied" Votes | 1 |
Total "Somewhat Satisfied" Votes | 2 |
Total "Not Satisfied" Votes | 1 |
Total Rank Assessments | 3 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 5 kyu |
Lowest Assessed Rank | 6 kyu |