#include "Stdio.h"
#include "Conio.h"
main()
{ int j,i=0,x=0,y=0,t=0;
for(j=7*21;i<=j;i++)
{
if(i%5==0&&i%6==0&&i%7==0)x+=3;
else if(i%5==0&&i%6==0)y+=2;
else if(i%6==0&&i%7==0)y+=2;
else if(i%5==0&&i%7==0)y+=2;
}
x=x-x/3; y=y-y/2; t=21*3;
t=t-x-y;
printf("%d",t);
getch();
}
郁闷~~我算的是50
#include "Conio.h"
main()
{ int j,i=0,x=0,y=0,t=0;
for(j=7*21;i<=j;i++)
{
if(i%5==0&&i%6==0&&i%7==0)x+=3;
else if(i%5==0&&i%6==0)y+=2;
else if(i%6==0&&i%7==0)y+=2;
else if(i%5==0&&i%7==0)y+=2;
}
x=x-x/3; y=y-y/2; t=21*3;
t=t-x-y;
printf("%d",t);
getch();
}
郁闷~~我算的是50
今年俺是大菜鸟,明年俺希望是小菜鸟,......