#include<stdio.h>
int main()
{
int a;
int b;
int c;
int count=0;
for(a=1;a<=5;a++)
{
for(b=1;b<=5;b++)
{
for(c=1;c<=5;&&a!=b;c++)
{
if(c!=a&&c!=b)
{
count++;
printf("%2d,%2d,%2d",a,b,c);
if(count%4==0)
{
printf("\n");
}
}
}
}
}
printf("一共有%d种借书方案!\n",count);
return 0;
}