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.

Kemahiran: Machine Learning (ML), Matematik, Python, Kejuruteraan Perisian, Statistik

Lihat lagi: machine learning traffic prediction, traffic management using machine learning, tensorflow traffic prediction

Tentang Majikan:
( 0 ulasan ) Dorchester, United States

ID Projek: #19252070

27 pekerja bebas membida secara purata $36/jam untuk pekerjaan ini


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 Lagi

$45 USD / jam
(102 Ulasan)
$35 USD / jam
(72 Ulasan)

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 Lagi

$45 USD / jam
(31 Ulasan)

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 Lagi

$41 USD / jam
(107 Ulasan)

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 Lagi

$44 USD / jam
(31 Ulasan)

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 Lagi

$25 USD / jam
(68 Ulasan)

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 / jam
(84 Ulasan)

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 / jam
(43 Ulasan)

-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 Lagi

$41 USD / jam
(86 Ulasan)

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. Lagi

$25 USD / jam
(73 Ulasan)

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 Lagi

$35 USD / jam
(87 Ulasan)

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 Lagi

$27 USD / jam
(51 Ulasan)

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 Lagi

$45 USD / jam
(19 Ulasan)

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 Lagi

$25 USD / jam
(9 Ulasan)

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 Lagi

$40 USD / jam
(28 Ulasan)

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 / jam
(107 Ulasan)
$25 USD / jam
(8 Ulasan)

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 Lagi

$41 USD / jam
(17 Ulasan)

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 Lagi

$35 USD / jam
(15 Ulasan)

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 / jam
(2 Ulasan)