题解 | #数位五五#
数位五五
https://www.nowcoder.com/practice/4306996b0a534178b90b3514a8b30028
#include <stdio.h> int main() { int count=0; int a=0,b=0; scanf("%d%d",&a,&b); for(int i=a;i<=b;i++) { int m=i,sum=0; while(m) { sum=sum+m%10; m/=10; } if(sum%5==0) count++; } printf("%d",count); return 0; }