P13429 [CodeChef] flow005
入门
题目描述

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

Input
3
1200
500
242

Output
12
5
7

输入格式

见题面

输出格式

见题面

样例输入
3 1200 500 242
样例输出
12 5 7