🏡 index : github.com/captn3m0/codechef.git

---
category_name: school
problem_code: FLOW005
problem_name: 'Smallest Numbers of Notes'
languages_supported:
    - ADA
    - ASM
    - BASH
    - BF
    - C
    - 'C99 strict'
    - CAML
    - CLOJ
    - CLPS
    - 'CPP 4.3.2'
    - 'CPP 4.9.2'
    - CPP14
    - CS2
    - D
    - ERL
    - FORT
    - FS
    - GO
    - HASK
    - ICK
    - ICON
    - JAVA
    - JS
    - 'LISP clisp'
    - 'LISP sbcl'
    - LUA
    - NEM
    - NICE
    - NODEJS
    - 'PAS fpc'
    - 'PAS gpc'
    - PERL
    - PERL6
    - PHP
    - PIKE
    - PRLG
    - PYPY
    - PYTH
    - 'PYTH 3.4'
    - RUBY
    - SCALA
    - 'SCM chicken'
    - 'SCM guile'
    - 'SCM qobi'
    - ST
    - TCL
    - TEXT
    - WSPC
max_timelimit: '1'
source_sizelimit: '50000'
problem_author: vicky002
problem_tester: null
date_added: 27-04-2015
tags:
    - vicky002
time:
    view_start_date: 1436519986
    submit_start_date: 1436519986
    visible_start_date: 1436519986
    end_date: 1735669800
    current: 1492507616
layout: problem
---
All submissions for this problem are available.Consider a currency system in which there are notes of seven denominations, namely, Rs. 1, Rs. 2, Rs. 5, Rs. 10, Rs. 50, Rs. 100.
 If the sum of Rs. **N** is input, write a program to computer smallest number of notes that will combine to give Rs. **N**. />

### Input

The first line contains an integer **T**, total number of testcases. Then follow **T** lines, each line contains an integer **N**.

### Output

Display the smallest number of notes that will combine to give **N**.

### Constraints

- 1 **≤** **T** **≤** 1000
- 1 **≤** **N** **≤** 1000000

### Example

<pre>
<b>Input</b>
3 
1200
500
242

<b>Output</b>
12
5
7
</pre>