5 条题解
-
1高梓晴 (ts2024stu008) LV 10 @ 2025-1-4 14:26:16
#include <bits/stdc++.h> using namespace std; int main() { long long n,ans=0; cin >> n; while(n) { ans+=n/=5; } cout << ans << endl; return 0; }
有标志认证,属三无产品,请大家放心食用
-
02023-10-15 16:11:10@
#include <queue> #include <math.h> #include <cmath> #include <stack> #include <stdio.h> #include <iostream> #include <vector> #include <iomanip> #include <string.h> #include <algorithm> #include <cstring> #include <bits/stdc++.h> #include <limits> using namespace std; long long n,wu; int main(){ cin>>n; for(long long i=5;i<=n;i*=5){ wu+=n/i; } cout<<wu; return 0; }
-
02023-2-14 20:56:04@
简单奥数,求其中因数5的个数就行(2*5=10,但2的数量一定比5多)
#include<iostream> #include<sstream> #include<iomanip> #include<stdio.h> #include<math.h> #include<string> #include<string.h> using namespace std; int main(){ long long n,sum=0; cin>>n; while(n!=0){ sum+=n/5; n/=5; } cout<<sum; return 0; }
-
-12024-8-8 20:59:38@
#include<bits/stdc++.h> #define int long long using namespace std; int n,sum; signed main(){ cin>>n; while(n!=0){ n=n/5; sum=sum+n; } cout<<sum; }
-
-22024-6-14 19:13:48@
#include<iostream> #include<sstream> #include<iomanip> #include<stdio.h> #include<math.h> #include<string> #include<string.h> using namespace std; int main(){ long long n,sum=0; cin>>n; while(n!=0){ sum+=n/5; n/=5; } cout<<sum; return 0; }
- 1
信息
- ID
- 991
- 时间
- 1000ms
- 内存
- 128MiB
- 难度
- 6
- 标签
- 递交数
- 303
- 已通过
- 91
- 上传者