1. Erste Version: C, Evgeni Pavlidis


/**
* ACM programming Contest WS 08/09
* UVa Status: accepted
* Run Time: 0.080
* @author Evgeni Pavlidis evgenipavlidis@yahoo.de
*/
#include <stdio.h>

#define MAX 7489
#define COINS 5

int coins[] = {50, 25, 10, 5, 1};

long long nway[MAX+1];

int n = MAX,i,j,c,d;

int main()
{
nway[0] = 1;

for(i=0; i < COINS; i++)
{
c = coins[i];
for(j=c; j <= n; j++)
nway[j] += nway[j-c];
}

while(1)
{
scanf("%d\n", &n);
printf("%d\n", nway[n]);
if(feof(stdin))
return 0;
}
}