# 計算有多少個 0 ``` #include <stdio.h> int main() { long long int num,num2,i,a,out=0; scanf("%lld %lld",&num,&num2); if(num==0) out++; for(i=num;i<=num2;i++) { a=i; while(1) { if(a<10) break; else if(a%10==0) out++; a/=10; } } printf("%lld\n",out); } ```
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up