Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C Code - Kattis Problem On the planet Htrae Friday the 13th is a lucky day. You are going there on the next space ship

C Code - Kattis Problem

image text in transcribed

On the planet Htrae Friday the 13th is a lucky day. You are going there on the next space ship and want to calculate how many times it happens during a given year. Unfortunately they change their calendar every year. Every year starts on a Sunday, but other than that, they change everything. They have released a list of calendar specifications for the next few years. A calendar specification consists of the total number of days in the year, the number of months in the year, and the number of days in each of the months Your task is to figure out how many times there will be Friday the 13th based on the calendar specifications Input The first line of the input consists of a single integer, T, the number of test cases The first line of each of the T test cases is a line with two space separated integers, D and M, the total number of days in the year and the number of months in the year respectively. The second line of each test case consists of M space separated integers, d,, the number of days in each month . 1

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Conceptual Database Design An Entity Relationship Approach

Authors: Carol Batini, Stefano Ceri, Shamkant B. Navathe

1st Edition

0805302441, 978-0805302448

Students also viewed these Databases questions

Question

Describe method cohesion.

Answered: 1 week ago

Question

What are the classifications of Bank?

Answered: 1 week ago