unsigned foo( unsigned from, unsigned to ) { return (to-3)/6 >= (from+5-3)/6 ? (to-3)/6-(from+5-3)/6+1 : 0; }
unsigned count = 0; for( unsigned i=7; i<=91; ++i ) { count += (i%3==0 && i%2==1); }
#include<stdio.h> int main() { int n,i; int sum=0; //scanf("%d",&n); for(i=7;i<=91;i++){ if(i%3==0&&i%2!=0){ printf("%d\n",i); sum+=1; } } printf("%d个能被三整除的奇数\n",sum); }