My school is taking part in a programming competition near the end of April. Each school can have one team, with 3 people in it. I'm in our team.
You guys have any ideas?


Don't you mean radio shack, now?Kyle_Katarn wrote:Go team discovery channel!

On behalf of The Team: Thanks!JustBoo wrote:Congratulations.
Oh, come on. You guys are totally awesome! I've learnt so much by discussing on this board. It's probably one of the greatest experiences I'll ever have had (still having it - although a little less intensely due to school)!Remember us lowly programmers when you are running some giant corporation.

Code: Select all
int n=200;
int combinations=0;
for(int a=0;a<=n;a+=3)
for(int b=0;b<=n-a;b+=10)
for(int c=0;c<=n-a-b;c+=20)
if(a+b+c <= n)
{
cout << n-(a+b+c) << " * 1, " << a/3 << " * 3, " << b/10 << " * 10, " << c/20 << " * 20" << endl;
combinations++;
}
cout<<combinations<<" combinations"<<endl;
