Computers and Technology
Computers and Technology, 03.03.2021 17:20, irene003

Quarter Final Sample Test: 1 Greedy puppy
Tuzik is a little dog. But despite the fact he is still a puppy he already knows about the pretty things that coins are,
He knows that for every coin he can get very tasty bone from his master. He believes that some day he will find a
treasure and have loads of bones.
And finally he found something interesting. A wooden chest containing N coins! But as you should remember,
Tuzik is just a little dog, and so he can't open it by himself. Actually, the only thing he can really do is barking. He
can use his barking to attract nearby people and seek their help. He can set the loudness of his barking very
precisely, and therefore you can assume that he can choose to call any number of people from a minimum of 1. to a
maximum of
When people come and open the chest they divide all the coins between them in such a way that everyone will get
the same amount of coins and this amount is maximal possible. If some coins are not used they will leave it on the
ground and Tuzik will take them after they go away. Since Tuzik is clearly not a fool, he understands that his profit
depends on the number of people he will call. While Tuzik works on his barking, you have to find the maximum
possible number of coins he can get.
Input
The first line of the input contains an integer T denoting the number of test cases. Each of next T lines contains 2
space-separated integers: N and K, for this test case.โ€‹

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 22:30, juliangarcia0002
Which of the following factors would your hypothetical supervisor look at when deciding whether to test a biological material sample for dna? the amount of other evidence you have implicating a suspect in a crime the annual budget for the crime lab both of the above none of the above; you would almost always order a test
Answers: 3
image
Computers and Technology, 22.06.2019 23:30, Arealbot
To check spelling errors in a document, the word application uses the to determine appropriate spelling. internet built-in dictionary user-defined words other text in the document
Answers: 1
image
Computers and Technology, 23.06.2019 11:00, jolleyrancher78
What are the possible consequences of computer hacking? what is computer piracy? describe some examples. what are the effects of computer piracy? what are the possible consequences of computer piracy? what is intentional virus setting? describe some examples. what are the effects of intentional virus setting? what are the possible consequences of intentional virus setting? what is invasion of privacy? describe some examples. what are the effects of invasion of privacy? what are the possible consequences of invasion of privacy? what is an acceptable use policy and what is the purpose of the acceptable use policy what is intellectual property and how can you use it?
Answers: 1
image
Computers and Technology, 23.06.2019 12:00, anamatiascamaja
If you embed a word table into powerpoint, what happens when you make edits to the embedded data? a. edits made to embedded data change the data in the source file; however, edits made to the source file will not be reflected in the embedded data. b. edits made to embedded data will change the data in the source file, and edits made to the source file will be reflected in the embedded data. c. edits made to embedded data don't change the data in the source file, nor will edits made to the source file be reflected in the embedded data. d. edits made to embedded data don't change the data in the source file; however, edits made to the source file will be reflected in the embedded data.
Answers: 1
Do you know the correct answer?
Quarter Final Sample Test: 1 Greedy puppy
Tuzik is a little dog. But despite the fact he is st...

Questions in other subjects:

Konu
Mathematics, 18.03.2021 03:00