Python based Traffic pattern ITS

We can discuss the details with candidates that successfully demonstrate proficiency through completion of our basic pre requisite screening. for Python

Sample code is available for review upon request.


Tom is a salesman. He has a goal of selling T total units over the span of next D days. Because of some restrictions from his supplier he can only sell at most d(i) items in a day. Fortunately for him, his supplier has provided him a list of the maximum number of items he can sell each day for the D days in advance. Can you help him to identify in how many different ways can he sell his product over the span of D days so that the sum of the total items over those days exactly end up to T. And remember, he has to sell at least 1 product each day to maintain the title of salesman.


Input Format

The first line contains T, the total units you need to sell

The second line contains D, the number of days you have to meet your goal

The third line contains D numbers, each number d(i) represent the maximum number of units you can sell for the day.



0 < T <= 1000

0<D <= 200

0<d(i) <= 1000

Output Format****

A single number representing the total number of ways you can achieve your goal.

Print the answer modulo : 10^9 + 7


Sample Inputs below



2 3 4

Sample Output 0


Explanation 0

To make the sum 5, and keeping the constraint of atleast 1 sale per day, below are the following 5 ways to sell goods

1 1 3

1 3 1

2 2 1

2 1 2

1 2 2


Sample Input 1



1 1 1 1

Sample Output 1


Explanation 1

There is no way to meet his goal of selling 2 items for the next 4 days because of one of the two reasons:

If he keeps the rule of selling one item per day then he will sell more than 2 items and exceed his goal.

If he sells only two item then he wont be able to keep his title of salesman because of the at least one item per day limit.


You may attach a link or send your python file in response with the test cases.

Habilidades: Machine Learning (ML), Matemática, Python, Arquitetura de software, Estatísticas

Veja mais: machine learning traffic prediction, traffic management using machine learning, tensorflow traffic prediction

Acerca do Empregador:
( 0 comentários ) Dorchester, United States

ID do Projeto: #19252070

27 freelancers estão ofertando em média $36/hora para esse trabalho


Hi there, I have read your project description and i'm confident i can do this project for you perfectly.I still have a few questions. please leave a message on my chat so we can discuss the budget and deadline of the Mais

$45 USD / hora
(102 Comentários)
$35 USD / hora
(72 Comentários)

Hi! I’m an experienced Python developer, with more than 7 years in freelance and hundreds of successfully completed projects. Data science is one of my main fields of knowledge, so I definitely can help with your pro Mais

$45 USD / hora
(31 Comentários)

Hi I have deep experience and understandings in programming / algorithm also. I checked your project description in detail and I can surely handle it. Consultation is also welcome. Please read my profile, and ma Mais

$41 USD / hora
(107 Comentários)

Hello Thank you for your job opening I am an expert python developer with high experience and deep knowledge in machine learning and data science. I have gained enough experience in related libraries and algorithm Mais

$44 USD / hora
(31 Comentários)

Dear Employer, Greetings From Team Augurs. Coming to your project scope you can hire our Python developer for developing Python based Traffic pattern ITS. we have gone through the details mentioned in project Mais

$25 USD / hora
(68 Comentários)

Hi There, I can do it very quickly & effectively. I'm having more than 20 years of web development experience. Looking forward to work with you! Thanks!

$41 USD / hora
(84 Comentários)

Hello! As you can see my profile, I am a senior PYTHON developer. I read your project description and I am interested in your project. We can discuss more details on chat. Thank you.

$44 USD / hora
(43 Comentários)

-Interested Job. Pro achine Learning, Mathematics, Python, Software Architecture, Statistics expert. Best result in time----- [login to view URL] I read your description very carefully. I am very interesting for your proje Mais

$41 USD / hora
(86 Comentários)

Hello, I have gone through your job posting and become very much interested to work with you. I am an expert in this field. I have already completed several projects like this. For evidence you can see my profile. Mais

$25 USD / hora
(73 Comentários)

Hi, I have been working in Artificial intelligence for more than 6 years. I have completed a number of projects in pattern recognition. I can solve your test task but there is no option to attach files. please ping me Mais

$35 USD / hora
(87 Comentários)

I am an MSC majored in mathematics. I have rich exp in ACM/ICPC and deep understandings of algorithms. I won medals in IMO (International Mathematics Olympiad). I also have experience in online algorithm contests su Mais

$27 USD / hora
(51 Comentários)

Hello there, This is a default bid made. we'll discuss the price later in the chat after reading your project i can do this for you perfectly.I still have a few questions. please leave a message on my chat so we can di Mais

$45 USD / hora
(19 Comentários)

Hi there, We have been developing/maintaining various web applications in Python Django. Mostly these applications are hosted on clouds (AWS/Linode) and have SASS, CoffeeScript, AngularJS/JQuery, Bootstrap as front Mais

$25 USD / hora
(9 Comentários)

Hello, I'm software developer with 12+ years of experience and mathematician with a number of publications. Also I'm participant and problem writer of many algorithm competitions (Topcoder, ACM ICPC, etc). Feel Mais

$40 USD / hora
(28 Comentários)

Hi. I have 7 years of Python programming experience and have a lot of projects done here. Just look at my profile. And I can send you the solution to the problem that you described in a file if you want to.

$35 USD / hora
(107 Comentários)
$25 USD / hora
(8 Comentários)

My name is Pavel. A freelancer. I am a python developer. My main skill is web developing. My full stack course is django/react.js^angular/postgresql+external databases like firebase, aws dynamoDB. I am also good at me Mais

$41 USD / hora
(17 Comentários)

Hi, I have been working on Machine Learning, Pattern Recognition , Event Tracking and Natural Language Processing using Python. I have done products to get meaningful insights from News Content. I have process Mais

$35 USD / hora
(15 Comentários)

Hello, I am python experter. I have good experiences with many python projects. I can do your project. Please contact me to discuss more. Thank you.

$41 USD / hora
(2 Comentários)