NWU_ACM

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理
#include <bits/stdc++.h>
#define _xx ios_base::sync_with_stdio(0);cin.tie(0);
using namespace std;
typedef long long ll;
int main()
{
    ll n;
    cin >> n;
    int k = 0, m = 5, ans = 0;
    while(m <= n) ans += n/m, m *= 5;
    cout << ans << endl;
    return 0;
}
View Code

 

posted on 2017-05-22 20:29  NWU_ACM  阅读(129)  评论(0编辑  收藏  举报