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