Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In c++ please Problem D. Daenerys Input file: standard input standard output 1 second 256 megabytes Output file Time limit: Memory limit: In celebration of

In c++ please
image text in transcribed
Problem D. Daenerys Input file: standard input standard output 1 second 256 megabytes Output file Time limit: Memory limit: In celebration of her recent marriage, Daer no one has ever been able to hatch a dragon in over a century, the eggs were given to her merely as a decoration. But Daenerys has other plans. Daenerys knows that dragon eggs will hatch when they're set on fire, just as long as the eggs are old enough. Specifically, they will hatch if and only if they are at least p years old. Given the age of each of Daenerys's dragon eggs, determine how many of them are old enough to hatch, once they're set on fire. Input erys Targaryen has been given dragon eggs as a gift! Since The first line of input consists of two integers, n and p (1Sn, ps100), representing the number of dragon eggs and the age at which dragon eggs hatch. Each of the next n lines contains a number k (13ks100) describing the age of a given dragon egg. Output Output a single integer giving the number of dragons that will hatch from the dragon eggs Example standard output standard input 3 50 60 40 50

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

Database Concepts

Authors: David M. Kroenke

1st Edition

0130086509, 978-0130086501

More Books

Students also viewed these Databases questions

Question

Draft a proposal for a risk assessment exercise.

Answered: 1 week ago