fork download
  1. #include <stdio.h>
  2.  
  3. int main(){
  4. int i,a,b,c,d,e,count=0;
  5. for(i=1;i<=10000;i++){
  6. a=i/10000;
  7. b=i%10000/1000;
  8. c=i%1000/100;
  9. d=i%100/10;
  10. e=i%10;
  11. if((a+b+c+d+e)%7==3)
  12. count++;
  13. }printf("%d",count);
  14. return 0;
  15. }
Success #stdin #stdout 0s 5288KB
stdin
Standard input is empty
stdout
1433