Changing Money, Slides of Architecture

Definition of the Problem

Typology: Slides

2014/2015

Uploaded on 05/31/2015

ibnukipa
ibnukipa 🇮🇩

1 document

1 / 5

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Changing Money
Romario Wijaya | 5113100062 Ibnu Prayogi| 5113100150
Definisi Soal
Nikhil wants to repay his debts to Sita but would like to do so using
only highest denominations possible. Once he has decided to use a
denomination, he wants to use as many notes/coins of that
denomination as possible. Amounts to be paid are given as numbers
with two decimal places. Available denominations are given in an
array.
source: http://www.codechef.com/problems/KAN13G
pf3
pf4
pf5

Partial preview of the text

Download Changing Money and more Slides Architecture in PDF only on Docsity!

Changing Money

Definisi Soal

Nikhil wants to repay his debts to Sita but would like to do so using only highest denominations possible. Once he has decided to use a denomination, he wants to use as many notes/coins of that denomination as possible. Amounts to be paid are given as numbers with two decimal places. Available denominations are given in an array.

source: http://www.codechef.com/problems/KAN13G

Changing Money

Definisi Soal

The first line of the input will contain the number of test cases, T. The first line of each test case will contain 2 integers N and M denoting respectively the number of denomination values and the number of scenarios on that test case. Next line will contain the N denominations. Note that, a denomination can be either an integer x or a fractional number y, with exactly 2 digits after the decimal point and a zero (0) before the decimal point. It is guaranteed that there will always be a denomination of value 1 and 0.01. Then there will be M numbers in the next line. Each of these numbers z can either be an integer or a decimal number with exactly 2 digits after the decimal point (i.e. 100.50, 55.01). Each number represents the amount owed by Nikhil in the respective scenario

INPUT

Changing Money

Formalisme

Changing Money

Formalisme