[Plain] # include <stdio. h>
Int main ()
{
Int I;
Int num;
Int a [100];
Int count;
While (scanf ("% d", & num )! = EOF & num! = 0)
{
Count = 0;
For (I = 0; I <num; I ++)
{
Scanf ("% d", & a [I]);
}
For (I = 0; I <num; I ++)
{
If (a [I]> = 100)
{
Count + = a [I]/100;
A [I] = a [I] % 100;
}
If (a [I]> = 50)
{
Count + = a [I]/50;
A [I] = a [I] % 50;
}
If (a [I]> = 10)
{
Count + = a [I]/10;
A [I] = a [I] % 10;
}
If (a [I]> = 5)
{
Count + = a [I]/5;
A [I] = a [I] % 5;
}
If (a [I]> = 2)
{
Count + = a [I]/2;
A [I] = a [I] % 2;
}
Count + = a [I]/1;
}
Printf ("% d \ n", count );
}
Return 0;
}
# Include <stdio. h>
Int main ()
{
Int I;
Int num;
Int a [100];
Int count;
While (scanf ("% d", & num )! = EOF & num! = 0)
{
Count = 0;
For (I = 0; I <num; I ++)
{
Scanf ("% d", & a [I]);
}
For (I = 0; I <num; I ++)
{
If (a [I]> = 100)
{
Count + = a [I]/100;
A [I] = a [I] % 100;
}
If (a [I]> = 50)
{
Count + = a [I]/50;
A [I] = a [I] % 50;
}
If (a [I]> = 10)
{
Count + = a [I]/10;
A [I] = a [I] % 10;
}
If (a [I]> = 5)
{
Count + = a [I]/5;
A [I] = a [I] % 5;
}
If (a [I]> = 2)
{
Count + = a [I]/2;
A [I] = a [I] % 2;
}
Count + = a [I]/1;
}
Printf ("% d \ n", count );
}
Return 0;
}