Baker Brie is holding a celebration for being in business for 13 years, and having opened its 130th franchise. Baker Brie wants to congratulate franchises that have performed well throughout the years. Baker Brie also wants to congratulate everyone for performing well on certain days of the year! Baker Brie wants to offer congratulations as follows: If, in a single day, all franchises combined sell an amount of baked goods that is equivalent to a multiple of a baker's dozen (13), then all franchises will receive a bonus. • If an individual franchise, throughout its entire existence, has sold an amount of baked goods that is equivalent to a multiple of a baker's dozen (13), then that franchise will receive a bonus. Input Specification The input will contain 10 datasets. On the first line of each dataset there will be the values F and D separated by a space where F (4≤ F≤130) represents the number of franchises that Baker Brie has, and D (2≤ D≤ 4745) represents the number of days of information. On the next D lines, there will be F integers separated by spaces (each in the range 1 through 13 000), such that the ith integer on line j represents the number of baked goods sold by franchise i on day j. Output Specification You must determine, both for each day (across all franchises) and for each franchise (across all days), whether or not the number of baked goods sold is a multiple of 13. If it is, you need to track how many baker's dozens were sold. Report the total number of baker's dozens as a single integer on its own line.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Code in python please. Follow input and output exactly how it is in pic.

 

Baker Brie is holding a celebration for being in business for 13 years, and having opened its 130th franchise. Baker Brie wants to congratulate franchises that have performed well
throughout the years. Baker Brie also wants to congratulate everyone for performing well on certain days of the year!
Baker Brie wants to offer congratulations as follows:
• If, in a single day, all franchises combined sell an amount of baked goods that is equivalent to a multiple of a baker's dozen (13), then all franchises will receive a bonus.
• If an individual franchise, throughout its entire existence, has sold an amount of baked goods that is equivalent to a multiple of a baker's dozen (13), then that franchise will receive a
bonus.
Input Specification
The input will contain 10 datasets.
On the first line of each dataset there will be the values F and D separated by a space where F (4 ≤ F≤ 130) represents the number of franchises that Baker Brie has, and D
(2 ≤ D≤ 4745) represents the number of days of information.
On the next D lines, there will be F integers separated by spaces (each in the range 1 through 13 000), such that the ith integer on line j represents the number of baked goods sold by
franchise i on day j.
Output Specification
You must determine, both for each day (across all franchises) and for each franchise (across all days), whether or not the number of baked goods sold is a multiple of 13. If it is, you need
to track how many baker's dozens were sold. Report the total number of baker's dozens as a single integer on its own line.
Transcribed Image Text:Baker Brie is holding a celebration for being in business for 13 years, and having opened its 130th franchise. Baker Brie wants to congratulate franchises that have performed well throughout the years. Baker Brie also wants to congratulate everyone for performing well on certain days of the year! Baker Brie wants to offer congratulations as follows: • If, in a single day, all franchises combined sell an amount of baked goods that is equivalent to a multiple of a baker's dozen (13), then all franchises will receive a bonus. • If an individual franchise, throughout its entire existence, has sold an amount of baked goods that is equivalent to a multiple of a baker's dozen (13), then that franchise will receive a bonus. Input Specification The input will contain 10 datasets. On the first line of each dataset there will be the values F and D separated by a space where F (4 ≤ F≤ 130) represents the number of franchises that Baker Brie has, and D (2 ≤ D≤ 4745) represents the number of days of information. On the next D lines, there will be F integers separated by spaces (each in the range 1 through 13 000), such that the ith integer on line j represents the number of baked goods sold by franchise i on day j. Output Specification You must determine, both for each day (across all franchises) and for each franchise (across all days), whether or not the number of baked goods sold is a multiple of 13. If it is, you need to track how many baker's dozens were sold. Report the total number of baker's dozens as a single integer on its own line.
Sample Input
4 5
43 24
3321
8 24 1
2 2 4 3
9323
42
4 4 4 1
1 1 3 4
Sample Output
4
1
Note: Only 2 cases are shown in this sample.
Copy
Transcribed Image Text:Sample Input 4 5 43 24 3321 8 24 1 2 2 4 3 9323 42 4 4 4 1 1 1 3 4 Sample Output 4 1 Note: Only 2 cases are shown in this sample. Copy
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Probability Problems
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education